#!/usr/bin/env python
# -*- coding: utf-8 -*- 

#
# Generated  by generateDS.py version 2.7b.
#

import sys
import getopt
import re as re_

etree_ = None
Verbose_import_ = False
(   XMLParser_import_none, XMLParser_import_lxml,
    XMLParser_import_elementtree
    ) = range(3)
XMLParser_import_library = None
try:
    # lxml
    from lxml import etree as etree_
    XMLParser_import_library = XMLParser_import_lxml
    if Verbose_import_:
        print("running with lxml.etree")
except ImportError:
    try:
        # cElementTree from Python 2.5+
        import xml.etree.cElementTree as etree_
        XMLParser_import_library = XMLParser_import_elementtree
        if Verbose_import_:
            print("running with cElementTree on Python 2.5+")
    except ImportError:
        try:
            # ElementTree from Python 2.5+
            import xml.etree.ElementTree as etree_
            XMLParser_import_library = XMLParser_import_elementtree
            if Verbose_import_:
                print("running with ElementTree on Python 2.5+")
        except ImportError:
            try:
                # normal cElementTree install
                import cElementTree as etree_
                XMLParser_import_library = XMLParser_import_elementtree
                if Verbose_import_:
                    print("running with cElementTree")
            except ImportError:
                try:
                    # normal ElementTree install
                    import elementtree.ElementTree as etree_
                    XMLParser_import_library = XMLParser_import_elementtree
                    if Verbose_import_:
                        print("running with ElementTree")
                except ImportError:
                    raise ImportError("Failed to import ElementTree from any known place")

def parsexml_(*args, **kwargs):
    if (XMLParser_import_library == XMLParser_import_lxml and
        'parser' not in kwargs):
        # Use the lxml ElementTree compatible parser so that, e.g.,
        #   we ignore comments.
        kwargs['parser'] = etree_.ETCompatXMLParser()
    doc = etree_.parse(*args, **kwargs)
    return doc

#
# User methods
#
# Calls to the methods in these classes are generated by generateDS.py.
# You can replace these methods by re-implementing the following class
#   in a module named generatedssuper.py.

try:
    from generatedssuper import GeneratedsSuper
except ImportError, exp:

    class GeneratedsSuper(object):
        def gds_format_string(self, input_data, input_name=''):
            return input_data
        def gds_validate_string(self, input_data, node, input_name=''):
            return input_data
        def gds_format_integer(self, input_data, input_name=''):
            return '%d' % input_data
        def gds_validate_integer(self, input_data, node, input_name=''):
            return input_data
        def gds_format_integer_list(self, input_data, input_name=''):
            return '%s' % input_data
        def gds_validate_integer_list(self, input_data, node, input_name=''):
            values = input_data.split()
            for value in values:
                try:
                    fvalue = float(value)
                except (TypeError, ValueError), exp:
                    raise_parse_error(node, 'Requires sequence of integers')
            return input_data
        def gds_format_float(self, input_data, input_name=''):
            return '%f' % input_data
        def gds_validate_float(self, input_data, node, input_name=''):
            return input_data
        def gds_format_float_list(self, input_data, input_name=''):
            return '%s' % input_data
        def gds_validate_float_list(self, input_data, node, input_name=''):
            values = input_data.split()
            for value in values:
                try:
                    fvalue = float(value)
                except (TypeError, ValueError), exp:
                    raise_parse_error(node, 'Requires sequence of floats')
            return input_data
        def gds_format_double(self, input_data, input_name=''):
            return '%e' % input_data
        def gds_validate_double(self, input_data, node, input_name=''):
            return input_data
        def gds_format_double_list(self, input_data, input_name=''):
            return '%s' % input_data
        def gds_validate_double_list(self, input_data, node, input_name=''):
            values = input_data.split()
            for value in values:
                try:
                    fvalue = float(value)
                except (TypeError, ValueError), exp:
                    raise_parse_error(node, 'Requires sequence of doubles')
            return input_data
        def gds_format_boolean(self, input_data, input_name=''):
            return '%s' % input_data
        def gds_validate_boolean(self, input_data, node, input_name=''):
            return input_data
        def gds_format_boolean_list(self, input_data, input_name=''):
            return '%s' % input_data
        def gds_validate_boolean_list(self, input_data, node, input_name=''):
            values = input_data.split()
            for value in values:
                if value not in ('true', '1', 'false', '0', ):
                    raise_parse_error(node, 'Requires sequence of booleans ("true", "1", "false", "0")')
            return input_data
        def gds_str_lower(self, instring):
            return instring.lower()
        def get_path_(self, node):
            path_list = []
            self.get_path_list_(node, path_list)
            path_list.reverse()
            path = '/'.join(path_list)
            return path
        Tag_strip_pattern_ = re_.compile(r'\{.*\}')
        def get_path_list_(self, node, path_list):
            if node is None:
                return
            tag = GeneratedsSuper.Tag_strip_pattern_.sub('', node.tag)
            if tag:
                path_list.append(tag)
            self.get_path_list_(node.getparent(), path_list)
        def get_class_obj_(self, node, default_class=None):
            class_obj1 = default_class
            if 'xsi' in node.nsmap:
                classname = node.get('{%s}type' % node.nsmap['xsi'])
                if classname is not None:
                    names = classname.split(':')
                    if len(names) == 2:
                        classname = names[1]
                    class_obj2 = globals().get(classname)
                    if class_obj2 is not None:
                        class_obj1 = class_obj2
            return class_obj1
        def gds_build_any(self, node, type_name=None):
            return None


#
# If you have installed IPython you can uncomment and use the following.
# IPython is available from http://ipython.scipy.org/.
#

## from IPython.Shell import IPShellEmbed
## args = ''
## ipshell = IPShellEmbed(args,
##     banner = 'Dropping into IPython',
##     exit_msg = 'Leaving Interpreter, back to program.')

# Then use the following line where and when you want to drop into the
# IPython shell:
#    ipshell('<some message> -- Entering ipshell.\nHit Ctrl-D to exit')

#
# Globals
#

ExternalEncoding = 'ascii'
Tag_pattern_ = re_.compile(r'({.*})?(.*)')
String_cleanup_pat_ = re_.compile(r"[\n\r\s]+")
Namespace_extract_pat_ = re_.compile(r'{(.*)}(.*)')

#
# Support/utility functions.
#

def showIndent(outfile, level):
    for idx in range(level):
        outfile.write('    ')

def quote_xml(inStr):
    if not inStr:
        return ''
    s1 = (isinstance(inStr, basestring) and inStr or
          '%s' % inStr)
    s1 = s1.replace('&', '&amp;')
    s1 = s1.replace('<', '&lt;')
    s1 = s1.replace('>', '&gt;')
    return s1

def quote_attrib(inStr):
    s1 = (isinstance(inStr, basestring) and inStr or
          '%s' % inStr)
    s1 = s1.replace('&', '&amp;')
    s1 = s1.replace('<', '&lt;')
    s1 = s1.replace('>', '&gt;')
    if '"' in s1:
        if "'" in s1:
            s1 = '"%s"' % s1.replace('"', "&quot;")
        else:
            s1 = "'%s'" % s1
    else:
        s1 = '"%s"' % s1
    return s1

def quote_python(inStr):
    s1 = inStr
    if s1.find("'") == -1:
        if s1.find('\n') == -1:
            return "'%s'" % s1
        else:
            return "'''%s'''" % s1
    else:
        if s1.find('"') != -1:
            s1 = s1.replace('"', '\\"')
        if s1.find('\n') == -1:
            return '"%s"' % s1
        else:
            return '"""%s"""' % s1

def get_all_text_(node):
    if node.text is not None:
        text = node.text
    else:
        text = ''
    for child in node:
        if child.tail is not None:
            text += child.tail
    return text

def find_attr_value_(attr_name, node):
    attrs = node.attrib
    attr_parts = attr_name.split(':')
    value = None
    if len(attr_parts) == 1:
        value = attrs.get(attr_name)
    elif len(attr_parts) == 2:
        prefix, name = attr_parts
        namespace = node.nsmap.get(prefix)
        if namespace is not None:
            value = attrs.get('{%s}%s' % (namespace, name, ))
    return value


class GDSParseError(Exception):
    pass

def raise_parse_error(node, msg):
    if XMLParser_import_library == XMLParser_import_lxml:
        msg = '%s (element %s/line %d)' % (msg, node.tag, node.sourceline, )
    else:
        msg = '%s (element %s)' % (msg, node.tag, )
    raise GDSParseError(msg)


class MixedContainer:
    # Constants for category:
    CategoryNone = 0
    CategoryText = 1
    CategorySimple = 2
    CategoryComplex = 3
    # Constants for content_type:
    TypeNone = 0
    TypeText = 1
    TypeString = 2
    TypeInteger = 3
    TypeFloat = 4
    TypeDecimal = 5
    TypeDouble = 6
    TypeBoolean = 7
    def __init__(self, category, content_type, name, value):
        self.category = category
        self.content_type = content_type
        self.name = name
        self.value = value
    def getCategory(self):
        return self.category
    def getContenttype(self, content_type):
        return self.content_type
    def getValue(self):
        return self.value
    def getName(self):
        return self.name
    def export(self, outfile, level, name, namespace):
        if self.category == MixedContainer.CategoryText:
            # Prevent exporting empty content as empty lines.
            if self.value.strip(): 
                outfile.write(self.value)
        elif self.category == MixedContainer.CategorySimple:
            self.exportSimple(outfile, level, name)
        else:    # category == MixedContainer.CategoryComplex
            self.value.export(outfile, level, namespace,name)
    def exportSimple(self, outfile, level, name):
        if self.content_type == MixedContainer.TypeString:
            outfile.write('<%s>%s</%s>' % (self.name, self.value, self.name))
        elif self.content_type == MixedContainer.TypeInteger or \
                self.content_type == MixedContainer.TypeBoolean:
            outfile.write('<%s>%d</%s>' % (self.name, self.value, self.name))
        elif self.content_type == MixedContainer.TypeFloat or \
                self.content_type == MixedContainer.TypeDecimal:
            outfile.write('<%s>%f</%s>' % (self.name, self.value, self.name))
        elif self.content_type == MixedContainer.TypeDouble:
            outfile.write('<%s>%g</%s>' % (self.name, self.value, self.name))
    def exportLiteral(self, outfile, level, name):
        if self.category == MixedContainer.CategoryText:
            showIndent(outfile, level)
            outfile.write('model_.MixedContainer(%d, %d, "%s", "%s"),\n' % \
                (self.category, self.content_type, self.name, self.value))
        elif self.category == MixedContainer.CategorySimple:
            showIndent(outfile, level)
            outfile.write('model_.MixedContainer(%d, %d, "%s", "%s"),\n' % \
                (self.category, self.content_type, self.name, self.value))
        else:    # category == MixedContainer.CategoryComplex
            showIndent(outfile, level)
            outfile.write('model_.MixedContainer(%d, %d, "%s",\n' % \
                (self.category, self.content_type, self.name,))
            self.value.exportLiteral(outfile, level + 1)
            showIndent(outfile, level)
            outfile.write(')\n')


class MemberSpec_(object):
    def __init__(self, name='', data_type='', container=0):
        self.name = name
        self.data_type = data_type
        self.container = container
    def set_name(self, name): self.name = name
    def get_name(self): return self.name
    def set_data_type(self, data_type): self.data_type = data_type
    def get_data_type_chain(self): return self.data_type
    def get_data_type(self):
        if isinstance(self.data_type, list):
            if len(self.data_type) > 0:
                return self.data_type[-1]
            else:
                return 'xs:string'
        else:
            return self.data_type
    def set_container(self, container): self.container = container
    def get_container(self): return self.container

def _cast(typ, value):
    if typ is None or value is None:
        return value
    return typ(value)

#
# Data representation classes.
#

class secimage(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, metadata=None, general_properties=None, parsegen=None, signing=None, post_process=None, images_list=None, data_provisioning=None):
        self.metadata = metadata
        self.general_properties = general_properties
        self.parsegen = parsegen
        self.signing = signing
        self.post_process = post_process
        self.images_list = images_list
        self.data_provisioning = data_provisioning
    def factory(*args_, **kwargs_):
        if secimage.subclass:
            return secimage.subclass(*args_, **kwargs_)
        else:
            return secimage(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_metadata(self): return self.metadata
    def set_metadata(self, metadata): self.metadata = metadata
    def get_general_properties(self): return self.general_properties
    def set_general_properties(self, general_properties): self.general_properties = general_properties
    def get_parsegen(self): return self.parsegen
    def set_parsegen(self, parsegen): self.parsegen = parsegen
    def get_signing(self): return self.signing
    def set_signing(self, signing): self.signing = signing
    def get_post_process(self): return self.post_process
    def set_post_process(self, post_process): self.post_process = post_process
    def get_images_list(self): return self.images_list
    def set_images_list(self, images_list): self.images_list = images_list
    def get_data_provisioning(self): return self.data_provisioning
    def set_data_provisioning(self, data_provisioning): self.data_provisioning = data_provisioning
    def export(self, outfile, level, namespace_='tns:', name_='secimage', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='secimage')
        if self.hasContent_():
            outfile.write('>\n')
            self.exportChildren(outfile, level + 1, namespace_, name_)
            showIndent(outfile, level)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='tns:', name_='secimage'):
        pass
    def exportChildren(self, outfile, level, namespace_='tns:', name_='secimage', fromsubclass_=False):
        if self.metadata is not None:
            self.metadata.export(outfile, level, namespace_, name_='metadata', )
        if self.general_properties is not None:
            self.general_properties.export(outfile, level, namespace_, name_='general_properties', )
        if self.parsegen is not None:
            self.parsegen.export(outfile, level, namespace_, name_='parsegen')
        if self.signing is not None:
            self.signing.export(outfile, level, namespace_, name_='signing', )
        if self.post_process is not None:
            self.post_process.export(outfile, level, namespace_, name_='post_process', )
        if self.images_list is not None:
            self.images_list.export(outfile, level, namespace_, name_='images_list', )
        if self.data_provisioning is not None:
            self.data_provisioning.export(outfile, level, namespace_, name_='data_provisioning', )
    def hasContent_(self):
        if (
            self.metadata is not None or
            self.general_properties is not None or
            self.parsegen is not None or
            self.signing is not None or
            self.post_process is not None or
            self.images_list is not None or
            self.data_provisioning is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='secimage'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.metadata is not None:
            showIndent(outfile, level)
            outfile.write('metadata=model_.complex_metadata(\n')
            self.metadata.exportLiteral(outfile, level, name_='metadata')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.general_properties is not None:
            showIndent(outfile, level)
            outfile.write('general_properties=model_.complex_general_properties(\n')
            self.general_properties.exportLiteral(outfile, level, name_='general_properties')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.parsegen is not None:
            showIndent(outfile, level)
            outfile.write('parsegen=model_.complex_parsegen(\n')
            self.parsegen.exportLiteral(outfile, level, name_='parsegen')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.signing is not None:
            showIndent(outfile, level)
            outfile.write('signing=model_.complex_signing(\n')
            self.signing.exportLiteral(outfile, level, name_='signing')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.post_process is not None:
            showIndent(outfile, level)
            outfile.write('post_process=model_.complex_post_process(\n')
            self.post_process.exportLiteral(outfile, level, name_='post_process')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.images_list is not None:
            showIndent(outfile, level)
            outfile.write('images_list=model_.complex_images_list(\n')
            self.images_list.exportLiteral(outfile, level, name_='images_list')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.data_provisioning is not None:
            showIndent(outfile, level)
            outfile.write('data_provisioning=model_.complex_data_provisioning(\n')
            self.data_provisioning.exportLiteral(outfile, level, name_='data_provisioning')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'metadata':
            obj_ = complex_metadata.factory()
            obj_.build(child_)
            self.set_metadata(obj_)
        elif nodeName_ == 'general_properties':
            obj_ = complex_general_properties.factory()
            obj_.build(child_)
            self.set_general_properties(obj_)
        elif nodeName_ == 'parsegen':
            obj_ = complex_parsegen.factory()
            obj_.build(child_)
            self.set_parsegen(obj_)
        elif nodeName_ == 'signing':
            obj_ = complex_signing.factory()
            obj_.build(child_)
            self.set_signing(obj_)
        elif nodeName_ == 'post_process':
            obj_ = complex_post_process.factory()
            obj_.build(child_)
            self.set_post_process(obj_)
        elif nodeName_ == 'images_list':
            obj_ = complex_images_list.factory()
            obj_.build(child_)
            self.set_images_list(obj_)
        elif nodeName_ == 'data_provisioning':
            obj_ = complex_data_provisioning.factory()
            obj_.build(child_)
            self.set_data_provisioning(obj_)
# end class secimage


class complex_metadata(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, chipset=None, version=None):
        self.chipset = chipset
        self.version = version
    def factory(*args_, **kwargs_):
        if complex_metadata.subclass:
            return complex_metadata.subclass(*args_, **kwargs_)
        else:
            return complex_metadata(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_chipset(self): return self.chipset
    def set_chipset(self, chipset): self.chipset = chipset
    def get_version(self): return self.version
    def set_version(self, version): self.version = version
    def export(self, outfile, level, namespace_='tns:', name_='complex_metadata', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='complex_metadata')
        if self.hasContent_():
            outfile.write('>\n')
            self.exportChildren(outfile, level + 1, namespace_, name_)
            showIndent(outfile, level)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='tns:', name_='complex_metadata'):
        pass
    def exportChildren(self, outfile, level, namespace_='tns:', name_='complex_metadata', fromsubclass_=False):
        if self.chipset is not None:
            showIndent(outfile, level)
            outfile.write('<%schipset>%s</%schipset>\n' % (namespace_, self.gds_format_string(quote_xml(self.chipset).encode(ExternalEncoding), input_name='chipset'), namespace_))
        if self.version is not None:
            showIndent(outfile, level)
            outfile.write('<%sversion>%s</%sversion>\n' % (namespace_, self.gds_format_string(quote_xml(self.version).encode(ExternalEncoding), input_name='version'), namespace_))
    def hasContent_(self):
        if (
            self.chipset is not None or
            self.version is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='complex_metadata'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.chipset is not None:
            showIndent(outfile, level)
            outfile.write('chipset=%s,\n' % quote_python(self.chipset).encode(ExternalEncoding))
        if self.version is not None:
            showIndent(outfile, level)
            outfile.write('version=%s,\n' % quote_python(self.version).encode(ExternalEncoding))
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'chipset':
            chipset_ = child_.text
            chipset_ = self.gds_validate_string(chipset_, node, 'chipset')
            self.chipset = chipset_
        elif nodeName_ == 'version':
            version_ = child_.text
            version_ = self.gds_validate_string(version_, node, 'version')
            self.version = version_
# end class complex_metadata


class complex_general_properties(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, selected_signer=None, selected_encryptor=None, selected_cert_config=None, max_cert_size=None, key_size=None, num_certs_in_certchain=None, num_root_certs=None, max_num_root_certs=None, testsig_serialnum=None, mrc_index=None, msm_part=None, oem_id=None, model_id=None, sw_id=None, anti_rollback_version=None, app_id=None, crash_dump=None, rot_en=None, soc_hw_version=None, soc_vers=None, mask_soc_hw_version=None, in_use_soc_hw_version=None, use_serial_number_in_signing=None, serial_number=None, debug=None, multi_serial_numbers=None, exponent=None, object_id=None, pmbl_properties=None, cass_capability=None, hash_pageseg_as_segment=None, hash_algorithm=None, segment_hash_algorithm=None, cass_attest_cert=None, rsa_padding=None, hmac=None, secboot_version=None, qti_sign=False, oem_sign=True, UIE_key=None, UIE_capability=None, UIE_server_cert_path=None, UIE_server_url=None, UIE_root_key_type=None, uie_key_switch_enable=None, oem_id_independent=None, revocation_enablement=None, activation_enablement=None, root_revoke_activate_enable=None, dsa_type=None, ecdsa_curve=None, multi_image_segment_addr=None, client_id=None, lib_id=None, image_entry=None):
        self.selected_signer = selected_signer
        self.selected_encryptor = selected_encryptor
        self.selected_cert_config = selected_cert_config
        self.max_cert_size = max_cert_size
        self.key_size = key_size
        self.num_certs_in_certchain = num_certs_in_certchain
        self.num_root_certs = num_root_certs
        self.max_num_root_certs = max_num_root_certs
        self.testsig_serialnum = testsig_serialnum
        self.mrc_index = mrc_index
        self.msm_part = msm_part
        self.oem_id = oem_id
        self.model_id = model_id
        self.sw_id = sw_id
        self.anti_rollback_version = anti_rollback_version
        self.app_id = app_id
        self.crash_dump = crash_dump
        self.rot_en = rot_en
        self.soc_hw_version = soc_hw_version
        self.soc_vers = soc_vers
        self.mask_soc_hw_version = mask_soc_hw_version
        self.in_use_soc_hw_version = in_use_soc_hw_version
        self.use_serial_number_in_signing = use_serial_number_in_signing
        self.serial_number = serial_number
        self.debug = debug
        self.multi_serial_numbers = multi_serial_numbers
        self.exponent = exponent
        self.object_id = object_id
        self.pmbl_properties = pmbl_properties
        self.cass_capability = cass_capability
        self.hash_pageseg_as_segment = hash_pageseg_as_segment
        self.hash_algorithm = hash_algorithm
        self.segment_hash_algorithm = segment_hash_algorithm
        self.cass_attest_cert = cass_attest_cert
        self.rsa_padding = rsa_padding
        self.hmac = hmac
        self.secboot_version = secboot_version
        self.qti_sign = qti_sign
        self.oem_sign = oem_sign
        self.UIE_key = UIE_key
        self.UIE_capability = UIE_capability
        self.UIE_server_cert_path = UIE_server_cert_path
        self.UIE_server_url = UIE_server_url
        self.UIE_root_key_type = UIE_root_key_type
        self.uie_key_switch_enable = uie_key_switch_enable
        self.oem_id_independent = oem_id_independent
        self.revocation_enablement = revocation_enablement
        self.activation_enablement = activation_enablement
        self.root_revoke_activate_enable = root_revoke_activate_enable
        self.dsa_type = dsa_type
        self.ecdsa_curve = ecdsa_curve
        self.multi_image_segment_addr = multi_image_segment_addr
        self.client_id = client_id
        self.lib_id = lib_id
        self.image_entry = image_entry
    def factory(*args_, **kwargs_):
        if complex_general_properties.subclass:
            return complex_general_properties.subclass(*args_, **kwargs_)
        else:
            return complex_general_properties(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_selected_signer(self): return self.selected_signer
    def set_selected_signer(self, selected_signer): self.selected_signer = selected_signer
    def get_selected_encryptor(self): return self.selected_encryptor
    def set_selected_encryptor(self, selected_encryptor): self.selected_encryptor = selected_encryptor
    def get_selected_cert_config(self): return self.selected_cert_config
    def set_selected_cert_config(self, selected_cert_config): self.selected_cert_config = selected_cert_config
    def get_max_cert_size(self): return self.max_cert_size
    def set_max_cert_size(self, max_cert_size): self.max_cert_size = max_cert_size
    def get_key_size(self): return self.key_size
    def set_key_size(self, key_size): self.key_size = key_size
    def get_num_certs_in_certchain(self): return self.num_certs_in_certchain
    def set_num_certs_in_certchain(self, num_certs_in_certchain): self.num_certs_in_certchain = num_certs_in_certchain
    def get_num_root_certs(self): return self.num_root_certs
    def set_num_root_certs(self, num_root_certs): self.num_root_certs = num_root_certs
    def get_max_num_root_certs(self): return self.max_num_root_certs
    def set_max_num_root_certs(self, max_num_root_certs): self.max_num_root_certs = max_num_root_certs
    def get_testsig_serialnum(self): return self.testsig_serialnum
    def set_testsig_serialnum(self, testsig_serialnum): self.testsig_serialnum = testsig_serialnum
    def get_mrc_index(self): return self.mrc_index
    def set_mrc_index(self, mrc_index): self.mrc_index = mrc_index
    def get_msm_part(self): return self.msm_part
    def set_msm_part(self, msm_part): self.msm_part = msm_part
    def get_oem_id(self): return self.oem_id
    def set_oem_id(self, oem_id): self.oem_id = oem_id
    def get_model_id(self): return self.model_id
    def set_model_id(self, model_id): self.model_id = model_id
    def get_sw_id(self): return self.sw_id
    def set_sw_id(self, sw_id): self.sw_id = sw_id
    def get_anti_rollback_version(self): return self.anti_rollback_version
    def set_anti_rollback_version(self, anti_rollback_version): self.anti_rollback_version = anti_rollback_version
    def get_app_id(self): return self.app_id
    def set_app_id(self, app_id): self.app_id = app_id
    def get_crash_dump(self): return self.crash_dump
    def set_crash_dump(self, crash_dump): self.crash_dump = crash_dump
    def get_rot_en(self): return self.rot_en
    def set_rot_en(self, rot_en): self.rot_en = rot_en
    def get_soc_hw_version(self): return self.soc_hw_version
    def set_soc_hw_version(self, soc_hw_version): self.soc_hw_version = soc_hw_version
    def get_soc_vers(self): return self.soc_vers
    def set_soc_vers(self, soc_vers): self.soc_vers = soc_vers
    def get_mask_soc_hw_version(self): return self.mask_soc_hw_version
    def set_mask_soc_hw_version(self, mask_soc_hw_version): self.mask_soc_hw_version = mask_soc_hw_version
    def get_in_use_soc_hw_version(self): return self.in_use_soc_hw_version
    def set_in_use_soc_hw_version(self, in_use_soc_hw_version): self.in_use_soc_hw_version = in_use_soc_hw_version
    def get_use_serial_number_in_signing(self): return self.use_serial_number_in_signing
    def set_use_serial_number_in_signing(self, use_serial_number_in_signing): self.use_serial_number_in_signing = use_serial_number_in_signing
    def get_serial_number(self): return self.serial_number
    def set_serial_number(self, serial_number): self.serial_number = serial_number
    def get_debug(self): return self.debug
    def set_debug(self, debug): self.debug = debug
    def get_multi_serial_numbers(self): return self.multi_serial_numbers
    def set_multi_serial_numbers(self, multi_serial_numbers): self.multi_serial_numbers = multi_serial_numbers
    def get_exponent(self): return self.exponent
    def set_exponent(self, exponent): self.exponent = exponent
    def get_object_id(self): return self.object_id
    def set_object_id(self, object_id): self.object_id = object_id
    def get_pmbl_properties(self): return self.pmbl_properties
    def set_pmbl_properties(self, pmbl_properties): self.pmbl_properties = pmbl_properties
    def get_cass_capability(self): return self.cass_capability
    def set_cass_capability(self, cass_capability): self.cass_capability = cass_capability
    def get_hash_pageseg_as_segment(self): return self.hash_pageseg_as_segment
    def set_hash_pageseg_as_segment(self, hash_pageseg_as_segment): self.hash_pageseg_as_segment = hash_pageseg_as_segment
    def get_hash_algorithm(self): return self.hash_algorithm
    def set_hash_algorithm(self, hash_algorithm): self.hash_algorithm = hash_algorithm
    def get_segment_hash_algorithm(self): return self.segment_hash_algorithm
    def set_segment_hash_algorithm(self, segment_hash_algorithm): self.segment_hash_algorithm = segment_hash_algorithm
    def get_cass_attest_cert(self): return self.cass_attest_cert
    def set_cass_attest_cert(self, cass_attest_cert): self.cass_attest_cert = cass_attest_cert
    def get_rsa_padding(self): return self.rsa_padding
    def set_rsa_padding(self, rsa_padding): self.rsa_padding = rsa_padding
    def get_hmac(self): return self.hmac
    def set_hmac(self, hmac): self.hmac = hmac
    def get_secboot_version(self): return self.secboot_version
    def set_secboot_version(self, secboot_version): self.secboot_version = secboot_version
    def get_qti_sign(self): return self.qti_sign
    def set_qti_sign(self, qti_sign): self.qti_sign = qti_sign
    def get_oem_sign(self): return self.oem_sign
    def set_oem_sign(self, oem_sign): self.oem_sign = oem_sign
    def get_UIE_key(self): return self.UIE_key
    def set_UIE_key(self, UIE_key): self.UIE_key = UIE_key
    def get_UIE_capability(self): return self.UIE_capability
    def set_UIE_capability(self, UIE_capability): self.UIE_capability = UIE_capability
    def get_UIE_server_cert_path(self): return self.UIE_server_cert_path
    def set_UIE_server_cert_path(self, UIE_server_cert_path): self.UIE_server_cert_path = UIE_server_cert_path
    def get_UIE_server_url(self): return self.UIE_server_url
    def set_UIE_server_url(self, UIE_server_url): self.UIE_server_url = UIE_server_url
    def get_UIE_root_key_type(self): return self.UIE_root_key_type
    def set_UIE_root_key_type(self, UIE_root_key_type): self.UIE_root_key_type = UIE_root_key_type
    def get_uie_key_switch_enable(self): return self.uie_key_switch_enable
    def set_uie_key_switch_enable(self, uie_key_switch_enable): self.uie_key_switch_enable = uie_key_switch_enable
    def get_oem_id_independent(self): return self.oem_id_independent
    def set_oem_id_independent(self, oem_id_independent): self.oem_id_independent = oem_id_independent
    def get_revocation_enablement(self): return self.revocation_enablement
    def set_revocation_enablement(self, revocation_enablement): self.revocation_enablement = revocation_enablement
    def get_activation_enablement(self): return self.activation_enablement
    def set_activation_enablement(self, activation_enablement): self.activation_enablement = activation_enablement
    def get_root_revoke_activate_enable(self): return self.root_revoke_activate_enable
    def set_root_revoke_activate_enable(self, root_revoke_activate_enable): self.root_revoke_activate_enable = root_revoke_activate_enable
    def get_dsa_type(self): return self.dsa_type
    def set_dsa_type(self, dsa_type): self.dsa_type = dsa_type
    def get_ecdsa_curve(self): return self.ecdsa_curve
    def set_ecdsa_curve(self, ecdsa_curve): self.ecdsa_curve = ecdsa_curve
    def get_multi_image_segment_addr(self): return self.multi_image_segment_addr
    def set_multi_image_segment_addr(self, multi_image_segment_addr): self.multi_image_segment_addr = multi_image_segment_addr
    def get_client_id(self): return self.client_id
    def set_client_id(self, client_id): self.client_id = client_id
    def get_lib_id(self): return self.lib_id
    def set_lib_id(self, lib_id): self.lib_id = lib_id
    def get_image_entry(self): return self.image_entry
    def set_image_entry(self, image_entry): self.image_entry = image_entry
    def export(self, outfile, level, namespace_='tns:', name_='complex_general_properties', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='complex_general_properties')
        if self.hasContent_():
            outfile.write('>\n')
            self.exportChildren(outfile, level + 1, namespace_, name_)
            showIndent(outfile, level)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='tns:', name_='complex_general_properties'):
        pass
    def exportChildren(self, outfile, level, namespace_='tns:', name_='complex_general_properties', fromsubclass_=False):
        if self.selected_signer is not None:
            showIndent(outfile, level)
            outfile.write('<%sselected_signer>%s</%sselected_signer>\n' % (namespace_, self.gds_format_string(quote_xml(self.selected_signer).encode(ExternalEncoding), input_name='selected_signer'), namespace_))
        if self.selected_encryptor is not None:
            showIndent(outfile, level)
            outfile.write('<%sselected_encryptor>%s</%sselected_encryptor>\n' % (namespace_, self.gds_format_string(quote_xml(self.selected_encryptor).encode(ExternalEncoding), input_name='selected_encryptor'), namespace_))
        if self.selected_cert_config is not None:
            showIndent(outfile, level)
            outfile.write('<%sselected_cert_config>%s</%sselected_cert_config>\n' % (namespace_, self.gds_format_string(quote_xml(self.selected_cert_config).encode(ExternalEncoding), input_name='selected_cert_config'), namespace_))
        if self.max_cert_size is not None:
            showIndent(outfile, level)
            outfile.write('<%smax_cert_size>%s</%smax_cert_size>\n' % (namespace_, self.gds_format_integer(self.max_cert_size, input_name='max_cert_size'), namespace_))
        if self.key_size is not None:
            showIndent(outfile, level)
            outfile.write('<%skey_size>%s</%skey_size>\n' % (namespace_, self.gds_format_integer(self.key_size, input_name='key_size'), namespace_))
        if self.num_certs_in_certchain is not None:
            showIndent(outfile, level)
            outfile.write('<%snum_certs_in_certchain>%s</%snum_certs_in_certchain>\n' % (namespace_, self.gds_format_integer(self.num_certs_in_certchain, input_name='num_certs_in_certchain'), namespace_))
        if self.num_root_certs is not None:
            showIndent(outfile, level)
            outfile.write('<%snum_root_certs>%s</%snum_root_certs>\n' % (namespace_, self.gds_format_integer(self.num_root_certs, input_name='num_root_certs'), namespace_))
        if self.max_num_root_certs is not None:
            showIndent(outfile, level)
            outfile.write('<%smax_num_root_certs>%s</%smax_num_root_certs>\n' % (namespace_, self.gds_format_integer(self.max_num_root_certs, input_name='max_num_root_certs'), namespace_))
        if self.testsig_serialnum is not None:
            showIndent(outfile, level)
            outfile.write('<%stestsig_serialnum>%s</%stestsig_serialnum>\n' % (namespace_, self.gds_format_string(quote_xml(self.testsig_serialnum).encode(ExternalEncoding), input_name='testsig_serialnum'), namespace_))
        if self.mrc_index is not None:
            showIndent(outfile, level)
            outfile.write('<%smrc_index>%s</%smrc_index>\n' % (namespace_, self.gds_format_integer(self.mrc_index, input_name='mrc_index'), namespace_))
        if self.msm_part is not None:
            showIndent(outfile, level)
            outfile.write('<%smsm_part>%s</%smsm_part>\n' % (namespace_, self.gds_format_string(quote_xml(self.msm_part).encode(ExternalEncoding), input_name='msm_part'), namespace_))
        if self.oem_id is not None:
            showIndent(outfile, level)
            outfile.write('<%soem_id>%s</%soem_id>\n' % (namespace_, self.gds_format_string(quote_xml(self.oem_id).encode(ExternalEncoding), input_name='oem_id'), namespace_))
        if self.model_id is not None:
            showIndent(outfile, level)
            outfile.write('<%smodel_id>%s</%smodel_id>\n' % (namespace_, self.gds_format_string(quote_xml(self.model_id).encode(ExternalEncoding), input_name='model_id'), namespace_))
        if self.sw_id is not None:
            showIndent(outfile, level)
            outfile.write('<%ssw_id>%s</%ssw_id>\n' % (namespace_, self.gds_format_string(quote_xml(self.sw_id).encode(ExternalEncoding), input_name='sw_id'), namespace_))
        if self.anti_rollback_version is not None:
            showIndent(outfile, level)
            outfile.write('<%santi_rollback_version>%s</%santi_rollback_version>\n' % (namespace_, self.gds_format_string(quote_xml(self.anti_rollback_version).encode(ExternalEncoding), input_name='anti_rollback_version'), namespace_))
        if self.app_id is not None:
            showIndent(outfile, level)
            outfile.write('<%sapp_id>%s</%sapp_id>\n' % (namespace_, self.gds_format_string(quote_xml(self.app_id).encode(ExternalEncoding), input_name='app_id'), namespace_))
        if self.crash_dump is not None:
            showIndent(outfile, level)
            outfile.write('<%scrash_dump>%s</%scrash_dump>\n' % (namespace_, self.gds_format_string(quote_xml(self.crash_dump).encode(ExternalEncoding), input_name='crash_dump'), namespace_))
        if self.rot_en is not None:
            showIndent(outfile, level)
            outfile.write('<%srot_en>%s</%srot_en>\n' % (namespace_, self.gds_format_string(quote_xml(self.rot_en).encode(ExternalEncoding), input_name='rot_en'), namespace_))
        if self.soc_hw_version is not None:
            showIndent(outfile, level)
            outfile.write('<%ssoc_hw_version>%s</%ssoc_hw_version>\n' % (namespace_, self.gds_format_string(quote_xml(self.soc_hw_version).encode(ExternalEncoding), input_name='soc_hw_version'), namespace_))
        if self.soc_vers is not None:
            showIndent(outfile, level)
            outfile.write('<%ssoc_vers>%s</%ssoc_vers>\n' % (namespace_, self.gds_format_string(quote_xml(self.soc_vers).encode(ExternalEncoding), input_name='soc_vers'), namespace_))
        if self.mask_soc_hw_version is not None:
            showIndent(outfile, level)
            outfile.write('<%smask_soc_hw_version>%s</%smask_soc_hw_version>\n' % (namespace_, self.gds_format_string(quote_xml(self.mask_soc_hw_version).encode(ExternalEncoding), input_name='mask_soc_hw_version'), namespace_))
        if self.in_use_soc_hw_version is not None:
            showIndent(outfile, level)
            outfile.write('<%sin_use_soc_hw_version>%s</%sin_use_soc_hw_version>\n' % (namespace_, self.gds_format_integer(self.in_use_soc_hw_version, input_name='in_use_soc_hw_version'), namespace_))
        if self.use_serial_number_in_signing is not None:
            showIndent(outfile, level)
            outfile.write('<%suse_serial_number_in_signing>%s</%suse_serial_number_in_signing>\n' % (namespace_, self.gds_format_integer(self.use_serial_number_in_signing, input_name='use_serial_number_in_signing'), namespace_))
        if self.serial_number is not None:
            showIndent(outfile, level)
            outfile.write('<%sserial_number>%s</%sserial_number>\n' % (namespace_, self.gds_format_string(quote_xml(self.serial_number).encode(ExternalEncoding), input_name='serial_number'), namespace_))
        if self.debug is not None:
            showIndent(outfile, level)
            outfile.write('<%sdebug>%s</%sdebug>\n' % (namespace_, self.gds_format_string(quote_xml(self.debug).encode(ExternalEncoding), input_name='debug'), namespace_))
        if self.multi_serial_numbers is not None:
            self.multi_serial_numbers.export(outfile, level, namespace_, name_='multi_serial_numbers')
        if self.exponent is not None:
            showIndent(outfile, level)
            outfile.write('<%sexponent>%s</%sexponent>\n' % (namespace_, self.gds_format_integer(self.exponent, input_name='exponent'), namespace_))
        if self.object_id is not None:
            self.object_id.export(outfile, level, namespace_, name_='object_id')
        if self.pmbl_properties is not None:
            self.pmbl_properties.export(outfile, level, namespace_, name_='pmbl_properties')
        if self.cass_capability is not None:
            showIndent(outfile, level)
            outfile.write('<%scass_capability>%s</%scass_capability>\n' % (namespace_, self.gds_format_string(quote_xml(self.cass_capability).encode(ExternalEncoding), input_name='cass_capability'), namespace_))
        if self.hash_pageseg_as_segment is not None:
            showIndent(outfile, level)
            outfile.write('<%shash_pageseg_as_segment>%s</%shash_pageseg_as_segment>\n' % (namespace_, self.gds_format_boolean(self.gds_str_lower(str(self.hash_pageseg_as_segment)), input_name='hash_pageseg_as_segment'), namespace_))
        if self.hash_algorithm is not None:
            showIndent(outfile, level)
            outfile.write('<%shash_algorithm>%s</%shash_algorithm>\n' % (namespace_, self.gds_format_string(quote_xml(self.hash_algorithm).encode(ExternalEncoding), input_name='hash_algorithm'), namespace_))
        if self.segment_hash_algorithm is not None:
            showIndent(outfile, level)
            outfile.write('<%ssegment_hash_algorithm>%s</%ssegment_hash_algorithm>\n' % (namespace_, self.gds_format_string(quote_xml(self.segment_hash_algorithm).encode(ExternalEncoding), input_name='segment_hash_algorithm'), namespace_))
        if self.cass_attest_cert is not None:
            showIndent(outfile, level)
            outfile.write('<%scass_attest_cert>%s</%scass_attest_cert>\n' % (namespace_, self.gds_format_string(quote_xml(self.cass_attest_cert).encode(ExternalEncoding), input_name='cass_attest_cert'), namespace_))
        if self.rsa_padding is not None:
            showIndent(outfile, level)
            outfile.write('<%srsa_padding>%s</%srsa_padding>\n' % (namespace_, self.gds_format_string(quote_xml(self.rsa_padding).encode(ExternalEncoding), input_name='rsa_padding'), namespace_))
        if self.hmac is not None:
            showIndent(outfile, level)
            outfile.write('<%shmac>%s</%shmac>\n' % (namespace_, self.gds_format_boolean(self.gds_str_lower(str(self.hmac)), input_name='hmac'), namespace_))
        if self.secboot_version is not None:
            showIndent(outfile, level)
            outfile.write('<%ssecboot_version>%s</%ssecboot_version>\n' % (namespace_, self.gds_format_string(quote_xml(self.secboot_version).encode(ExternalEncoding), input_name='secboot_version'), namespace_))
        if self.qti_sign is not None:
            showIndent(outfile, level)
            outfile.write('<%sqti_sign>%s</%sqti_sign>\n' % (namespace_, self.gds_format_boolean(self.gds_str_lower(str(self.qti_sign)), input_name='qti_sign'), namespace_))
        if self.oem_sign is not None:
            showIndent(outfile, level)
            outfile.write('<%soem_sign>%s</%soem_sign>\n' % (namespace_, self.gds_format_boolean(self.gds_str_lower(str(self.oem_sign)), input_name='oem_sign'), namespace_))
        if self.UIE_key is not None:
            showIndent(outfile, level)
            outfile.write('<%sUIE_key>%s</%sUIE_key>\n' % (namespace_, self.gds_format_string(quote_xml(self.UIE_key).encode(ExternalEncoding), input_name='UIE_key'), namespace_))
        if self.UIE_capability is not None:
            showIndent(outfile, level)
            outfile.write('<%sUIE_capability>%s</%sUIE_capability>\n' % (namespace_, self.gds_format_string(quote_xml(self.UIE_capability).encode(ExternalEncoding), input_name='UIE_capability'), namespace_))
        if self.UIE_server_cert_path is not None:
            showIndent(outfile, level)
            outfile.write('<%sUIE_server_cert_path>%s</%sUIE_server_cert_path>\n' % (namespace_, self.gds_format_string(quote_xml(self.UIE_server_cert_path).encode(ExternalEncoding), input_name='UIE_server_cert_path'), namespace_))
        if self.UIE_server_url is not None:
            showIndent(outfile, level)
            outfile.write('<%sUIE_server_url>%s</%sUIE_server_url>\n' % (namespace_, self.gds_format_string(quote_xml(self.UIE_server_url).encode(ExternalEncoding), input_name='UIE_server_url'), namespace_))
        if self.UIE_root_key_type is not None:
            showIndent(outfile, level)
            outfile.write('<%sUIE_root_key_type>%s</%sUIE_root_key_type>\n' % (namespace_, self.gds_format_integer(self.UIE_root_key_type, input_name='UIE_root_key_type'), namespace_))
        if self.uie_key_switch_enable is not None:
            showIndent(outfile, level)
            outfile.write('<%suie_key_switch_enable>%s</%suie_key_switch_enable>\n' % (namespace_, self.gds_format_string(quote_xml(self.uie_key_switch_enable).encode(ExternalEncoding), input_name='uie_key_switch_enable'), namespace_))
        if self.oem_id_independent is not None:
            showIndent(outfile, level)
            outfile.write('<%soem_id_independent>%s</%soem_id_independent>\n' % (namespace_, self.gds_format_integer(self.oem_id_independent, input_name='oem_id_independent'), namespace_))
        if self.revocation_enablement is not None:
            showIndent(outfile, level)
            outfile.write('<%srevocation_enablement>%s</%srevocation_enablement>\n' % (namespace_, self.gds_format_string(quote_xml(self.revocation_enablement).encode(ExternalEncoding), input_name='revocation_enablement'), namespace_))
        if self.activation_enablement is not None:
            showIndent(outfile, level)
            outfile.write('<%sactivation_enablement>%s</%sactivation_enablement>\n' % (namespace_, self.gds_format_string(quote_xml(self.activation_enablement).encode(ExternalEncoding), input_name='activation_enablement'), namespace_))
        if self.root_revoke_activate_enable is not None:
            showIndent(outfile, level)
            outfile.write('<%sroot_revoke_activate_enable>%s</%sroot_revoke_activate_enable>\n' % (namespace_, self.gds_format_string(quote_xml(self.root_revoke_activate_enable).encode(ExternalEncoding), input_name='root_revoke_activate_enable'), namespace_))
        if self.dsa_type is not None:
            showIndent(outfile, level)
            outfile.write('<%sdsa_type>%s</%sdsa_type>\n' % (namespace_, self.gds_format_string(quote_xml(self.dsa_type).encode(ExternalEncoding), input_name='dsa_type'), namespace_))
        if self.ecdsa_curve is not None:
            showIndent(outfile, level)
            outfile.write('<%secdsa_curve>%s</%secdsa_curve>\n' % (namespace_, self.gds_format_string(quote_xml(self.ecdsa_curve).encode(ExternalEncoding), input_name='ecdsa_curve'), namespace_))
        if self.multi_image_segment_addr is not None:
            showIndent(outfile, level)
            outfile.write('<%smulti_image_segment_addr>%s</%smulti_image_segment_addr>\n' % (namespace_, self.gds_format_string(quote_xml(self.multi_image_segment_addr).encode(ExternalEncoding), input_name='multi_image_segment_addr'), namespace_))
        if self.client_id is not None:
            showIndent(outfile, level)
            outfile.write('<%sclient_id>%s</%sclient_id>\n' % (namespace_, self.gds_format_string(quote_xml(self.client_id).encode(ExternalEncoding), input_name='client_id'), namespace_))
        if self.lib_id is not None:
            showIndent(outfile, level)
            outfile.write('<%slib_id>%s</%slib_id>\n' % (namespace_, self.gds_format_string(quote_xml(self.lib_id).encode(ExternalEncoding), input_name='lib_id'), namespace_))
        if self.image_entry is not None:
            showIndent(outfile, level)
            outfile.write('<%simage_entry>%s</%simage_entry>\n' % (namespace_, self.gds_format_string(quote_xml(self.image_entry).encode(ExternalEncoding), input_name='image_entry'), namespace_))
    def hasContent_(self):
        if (
            self.selected_signer is not None or
            self.selected_encryptor is not None or
            self.selected_cert_config is not None or
            self.max_cert_size is not None or
            self.key_size is not None or
            self.num_certs_in_certchain is not None or
            self.num_root_certs is not None or
            self.max_num_root_certs is not None or
            self.testsig_serialnum is not None or
            self.mrc_index is not None or
            self.msm_part is not None or
            self.oem_id is not None or
            self.model_id is not None or
            self.sw_id is not None or
            self.anti_rollback_version is not None or
            self.app_id is not None or
            self.crash_dump is not None or
            self.rot_en is not None or
            self.soc_hw_version is not None or
            self.soc_vers is not None or
            self.mask_soc_hw_version is not None or
            self.in_use_soc_hw_version is not None or
            self.use_serial_number_in_signing is not None or
            self.serial_number is not None or
            self.debug is not None or
            self.multi_serial_numbers is not None or
            self.exponent is not None or
            self.object_id is not None or
            self.pmbl_properties is not None or
            self.cass_capability is not None or
            self.hash_pageseg_as_segment is not None or
            self.hash_algorithm is not None or
            self.segment_hash_algorithm is not None or
            self.cass_attest_cert is not None or
            self.rsa_padding is not None or
            self.hmac is not None or
            self.secboot_version is not None or
            self.qti_sign is not None or
            self.oem_sign is not None or
            self.UIE_key is not None or
            self.UIE_capability is not None or
            self.UIE_server_cert_path is not None or
            self.UIE_server_url is not None or
            self.UIE_root_key_type is not None or
            self.uie_key_switch_enable is not None or
            self.oem_id_independent is not None or
            self.revocation_enablement is not None or
            self.activation_enablement is not None or
            self.root_revoke_activate_enable is not None or
            self.dsa_type is not None or
            self.ecdsa_curve is not None or
            self.multi_image_segment_addr is not None or
            self.client_id is not None or
            self.lib_id is not None or
            self.image_entry is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='complex_general_properties'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.selected_signer is not None:
            showIndent(outfile, level)
            outfile.write('selected_signer=%s,\n' % quote_python(self.selected_signer).encode(ExternalEncoding))
        if self.selected_encryptor is not None:
            showIndent(outfile, level)
            outfile.write('selected_encryptor=%s,\n' % quote_python(self.selected_encryptor).encode(ExternalEncoding))
        if self.selected_cert_config is not None:
            showIndent(outfile, level)
            outfile.write('selected_cert_config=%s,\n' % quote_python(self.selected_cert_config).encode(ExternalEncoding))
        if self.max_cert_size is not None:
            showIndent(outfile, level)
            outfile.write('max_cert_size=%d,\n' % self.max_cert_size)
        if self.key_size is not None:
            showIndent(outfile, level)
            outfile.write('key_size=%d,\n' % self.key_size)
        if self.num_certs_in_certchain is not None:
            showIndent(outfile, level)
            outfile.write('num_certs_in_certchain=%d,\n' % self.num_certs_in_certchain)
        if self.num_root_certs is not None:
            showIndent(outfile, level)
            outfile.write('num_root_certs=%d,\n' % self.num_root_certs)
        if self.max_num_root_certs is not None:
            showIndent(outfile, level)
            outfile.write('max_num_root_certs=%d,\n' % self.max_num_root_certs)
        if self.testsig_serialnum is not None:
            showIndent(outfile, level)
            outfile.write('testsig_serialnum=%s,\n' % quote_python(self.testsig_serialnum).encode(ExternalEncoding))
        if self.mrc_index is not None:
            showIndent(outfile, level)
            outfile.write('mrc_index=%d,\n' % self.mrc_index)
        if self.msm_part is not None:
            showIndent(outfile, level)
            outfile.write('msm_part=%s,\n' % quote_python(self.msm_part).encode(ExternalEncoding))
        if self.oem_id is not None:
            showIndent(outfile, level)
            outfile.write('oem_id=%s,\n' % quote_python(self.oem_id).encode(ExternalEncoding))
        if self.model_id is not None:
            showIndent(outfile, level)
            outfile.write('model_id=%s,\n' % quote_python(self.model_id).encode(ExternalEncoding))
        if self.sw_id is not None:
            showIndent(outfile, level)
            outfile.write('sw_id=%s,\n' % quote_python(self.sw_id).encode(ExternalEncoding))
        if self.anti_rollback_version is not None:
            showIndent(outfile, level)
            outfile.write('anti_rollback_version=%s,\n' % quote_python(self.anti_rollback_version).encode(ExternalEncoding))
        if self.app_id is not None:
            showIndent(outfile, level)
            outfile.write('app_id=%s,\n' % quote_python(self.app_id).encode(ExternalEncoding))
        if self.crash_dump is not None:
            showIndent(outfile, level)
            outfile.write('crash_dump=%s,\n' % quote_python(self.crash_dump).encode(ExternalEncoding))
        if self.rot_en is not None:
            showIndent(outfile, level)
            outfile.write('rot_en=%s,\n' % quote_python(self.rot_en).encode(ExternalEncoding))
        if self.soc_hw_version is not None:
            showIndent(outfile, level)
            outfile.write('soc_hw_version=%s,\n' % quote_python(self.soc_hw_version).encode(ExternalEncoding))
        if self.soc_vers is not None:
            showIndent(outfile, level)
            outfile.write('soc_vers=%s,\n' % quote_python(self.soc_vers).encode(ExternalEncoding))
        if self.mask_soc_hw_version is not None:
            showIndent(outfile, level)
            outfile.write('mask_soc_hw_version=%s,\n' % quote_python(self.mask_soc_hw_version).encode(ExternalEncoding))
        if self.in_use_soc_hw_version is not None:
            showIndent(outfile, level)
            outfile.write('in_use_soc_hw_version=%d,\n' % self.in_use_soc_hw_version)
        if self.use_serial_number_in_signing is not None:
            showIndent(outfile, level)
            outfile.write('use_serial_number_in_signing=%d,\n' % self.use_serial_number_in_signing)
        if self.serial_number is not None:
            showIndent(outfile, level)
            outfile.write('serial_number=%s,\n' % quote_python(self.serial_number).encode(ExternalEncoding))
        if self.debug is not None:
            showIndent(outfile, level)
            outfile.write('debug=%s,\n' % quote_python(self.debug).encode(ExternalEncoding))
        if self.multi_serial_numbers is not None:
            showIndent(outfile, level)
            outfile.write('multi_serial_numbers=model_.complex_multi_serial_numbers(\n')
            self.multi_serial_numbers.exportLiteral(outfile, level, name_='multi_serial_numbers')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.exponent is not None:
            showIndent(outfile, level)
            outfile.write('exponent=%d,\n' % self.exponent)
        if self.object_id is not None:
            showIndent(outfile, level)
            outfile.write('object_id=model_.complex_oid(\n')
            self.object_id.exportLiteral(outfile, level, name_='object_id')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.pmbl_properties is not None:
            showIndent(outfile, level)
            outfile.write('pmbl_properties=model_.complex_pmbl_properties(\n')
            self.pmbl_properties.exportLiteral(outfile, level, name_='pmbl_properties')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.cass_capability is not None:
            showIndent(outfile, level)
            outfile.write('cass_capability=%s,\n' % quote_python(self.cass_capability).encode(ExternalEncoding))
        if self.hash_pageseg_as_segment is not None:
            showIndent(outfile, level)
            outfile.write('hash_pageseg_as_segment=%s,\n' % self.hash_pageseg_as_segment)
        if self.hash_algorithm is not None:
            showIndent(outfile, level)
            outfile.write('hash_algorithm=%s,\n' % quote_python(self.hash_algorithm).encode(ExternalEncoding))
        if self.segment_hash_algorithm is not None:
            showIndent(outfile, level)
            outfile.write('segment_hash_algorithm=%s,\n' % quote_python(self.segment_hash_algorithm).encode(ExternalEncoding))
        if self.cass_attest_cert is not None:
            showIndent(outfile, level)
            outfile.write('cass_attest_cert=%s,\n' % quote_python(self.cass_attest_cert).encode(ExternalEncoding))
        if self.rsa_padding is not None:
            showIndent(outfile, level)
            outfile.write('rsa_padding=%s,\n' % quote_python(self.rsa_padding).encode(ExternalEncoding))
        if self.hmac is not None:
            showIndent(outfile, level)
            outfile.write('hmac=%s,\n' % self.hmac)
        if self.secboot_version is not None:
            showIndent(outfile, level)
            outfile.write('secboot_version=%s,\n' % quote_python(self.secboot_version).encode(ExternalEncoding))
        if self.qti_sign is not None:
            showIndent(outfile, level)
            outfile.write('qti_sign=%s,\n' % self.qti_sign)
        if self.oem_sign is not None:
            showIndent(outfile, level)
            outfile.write('oem_sign=%s,\n' % self.oem_sign)
        if self.UIE_key is not None:
            showIndent(outfile, level)
            outfile.write('UIE_key=%s,\n' % quote_python(self.UIE_key).encode(ExternalEncoding))
        if self.UIE_capability is not None:
            showIndent(outfile, level)
            outfile.write('UIE_capability=%s,\n' % quote_python(self.UIE_capability).encode(ExternalEncoding))
        if self.UIE_server_cert_path is not None:
            showIndent(outfile, level)
            outfile.write('UIE_server_cert_path=%s,\n' % quote_python(self.UIE_server_cert_path).encode(ExternalEncoding))
        if self.UIE_server_url is not None:
            showIndent(outfile, level)
            outfile.write('UIE_server_url=%s,\n' % quote_python(self.UIE_server_url).encode(ExternalEncoding))
        if self.UIE_root_key_type is not None:
            showIndent(outfile, level)
            outfile.write('UIE_root_key_type=%d,\n' % self.UIE_root_key_type)
        if self.uie_key_switch_enable is not None:
            showIndent(outfile, level)
            outfile.write('uie_key_switch_enable=%s,\n' % quote_python(self.uie_key_switch_enable).encode(ExternalEncoding))
        if self.oem_id_independent is not None:
            showIndent(outfile, level)
            outfile.write('oem_id_independent=%d,\n' % self.oem_id_independent)
        if self.revocation_enablement is not None:
            showIndent(outfile, level)
            outfile.write('revocation_enablement=%s,\n' % quote_python(self.revocation_enablement).encode(ExternalEncoding))
        if self.activation_enablement is not None:
            showIndent(outfile, level)
            outfile.write('activation_enablement=%s,\n' % quote_python(self.activation_enablement).encode(ExternalEncoding))
        if self.root_revoke_activate_enable is not None:
            showIndent(outfile, level)
            outfile.write('root_revoke_activate_enable=%s,\n' % quote_python(self.root_revoke_activate_enable).encode(ExternalEncoding))
        if self.dsa_type is not None:
            showIndent(outfile, level)
            outfile.write('dsa_type=%s,\n' % quote_python(self.dsa_type).encode(ExternalEncoding))
        if self.ecdsa_curve is not None:
            showIndent(outfile, level)
            outfile.write('ecdsa_curve=%s,\n' % quote_python(self.ecdsa_curve).encode(ExternalEncoding))
        if self.multi_image_segment_addr is not None:
            showIndent(outfile, level)
            outfile.write('multi_image_segment_addr=%s,\n' % quote_python(self.multi_image_segment_addr).encode(ExternalEncoding))
        if self.client_id is not None:
            showIndent(outfile, level)
            outfile.write('client_id=%s,\n' % quote_python(self.client_id).encode(ExternalEncoding))
        if self.lib_id is not None:
            showIndent(outfile, level)
            outfile.write('lib_id=%s,\n' % quote_python(self.lib_id).encode(ExternalEncoding))
        if self.image_entry is not None:
            showIndent(outfile, level)
            outfile.write('image_entry=%s,\n' % quote_python(self.image_entry).encode(ExternalEncoding))
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'selected_signer':
            selected_signer_ = child_.text
            selected_signer_ = self.gds_validate_string(selected_signer_, node, 'selected_signer')
            self.selected_signer = selected_signer_
        elif nodeName_ == 'selected_encryptor':
            selected_encryptor_ = child_.text
            selected_encryptor_ = self.gds_validate_string(selected_encryptor_, node, 'selected_encryptor')
            self.selected_encryptor = selected_encryptor_
        elif nodeName_ == 'selected_cert_config':
            selected_cert_config_ = child_.text
            selected_cert_config_ = self.gds_validate_string(selected_cert_config_, node, 'selected_cert_config')
            self.selected_cert_config = selected_cert_config_
        elif nodeName_ == 'max_cert_size':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError), exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            ival_ = self.gds_validate_integer(ival_, node, 'max_cert_size')
            self.max_cert_size = ival_
        elif nodeName_ == 'key_size':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError), exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            ival_ = self.gds_validate_integer(ival_, node, 'key_size')
            self.key_size = ival_
        elif nodeName_ == 'num_certs_in_certchain':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError), exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            ival_ = self.gds_validate_integer(ival_, node, 'num_certs_in_certchain')
            self.num_certs_in_certchain = ival_
        elif nodeName_ == 'num_root_certs':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError), exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            ival_ = self.gds_validate_integer(ival_, node, 'num_root_certs')
            self.num_root_certs = ival_
        elif nodeName_ == 'max_num_root_certs':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError), exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            ival_ = self.gds_validate_integer(ival_, node, 'max_num_root_certs')
            self.max_num_root_certs = ival_
        elif nodeName_ == 'testsig_serialnum':
            testsig_serialnum_ = child_.text
            testsig_serialnum_ = self.gds_validate_string(testsig_serialnum_, node, 'testsig_serialnum')
            self.testsig_serialnum = testsig_serialnum_
        elif nodeName_ == 'mrc_index':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError), exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            ival_ = self.gds_validate_integer(ival_, node, 'mrc_index')
            self.mrc_index = ival_
        elif nodeName_ == 'msm_part':
            msm_part_ = child_.text
            msm_part_ = self.gds_validate_string(msm_part_, node, 'msm_part')
            self.msm_part = msm_part_
        elif nodeName_ == 'oem_id':
            oem_id_ = child_.text
            oem_id_ = self.gds_validate_string(oem_id_, node, 'oem_id')
            self.oem_id = oem_id_
        elif nodeName_ == 'model_id':
            model_id_ = child_.text
            model_id_ = self.gds_validate_string(model_id_, node, 'model_id')
            self.model_id = model_id_
        elif nodeName_ == 'sw_id':
            sw_id_ = child_.text
            sw_id_ = self.gds_validate_string(sw_id_, node, 'sw_id')
            self.sw_id = sw_id_
        elif nodeName_ == 'anti_rollback_version':
            anti_rollback_version_ = child_.text
            anti_rollback_version_ = self.gds_validate_string(anti_rollback_version_, node, 'anti_rollback_version')
            self.anti_rollback_version = anti_rollback_version_
        elif nodeName_ == 'app_id':
            app_id_ = child_.text
            app_id_ = self.gds_validate_string(app_id_, node, 'app_id')
            self.app_id = app_id_
        elif nodeName_ == 'crash_dump':
            crash_dump_ = child_.text
            crash_dump_ = self.gds_validate_string(crash_dump_, node, 'crash_dump')
            self.crash_dump = crash_dump_
        elif nodeName_ == 'rot_en':
            rot_en_ = child_.text
            rot_en_ = self.gds_validate_string(rot_en_, node, 'rot_en')
            self.rot_en = rot_en_
        elif nodeName_ == 'soc_hw_version':
            soc_hw_version_ = child_.text
            soc_hw_version_ = self.gds_validate_string(soc_hw_version_, node, 'soc_hw_version')
            self.soc_hw_version = soc_hw_version_
        elif nodeName_ == 'soc_vers':
            soc_vers_ = child_.text
            soc_vers_ = self.gds_validate_string(soc_vers_, node, 'soc_vers')
            self.soc_vers = soc_vers_
        elif nodeName_ == 'mask_soc_hw_version':
            mask_soc_hw_version_ = child_.text
            mask_soc_hw_version_ = self.gds_validate_string(mask_soc_hw_version_, node, 'mask_soc_hw_version')
            self.mask_soc_hw_version = mask_soc_hw_version_
        elif nodeName_ == 'in_use_soc_hw_version':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError), exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            ival_ = self.gds_validate_integer(ival_, node, 'in_use_soc_hw_version')
            self.in_use_soc_hw_version = ival_
        elif nodeName_ == 'use_serial_number_in_signing':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError), exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            ival_ = self.gds_validate_integer(ival_, node, 'use_serial_number_in_signing')
            self.use_serial_number_in_signing = ival_
        elif nodeName_ == 'serial_number':
            serial_number_ = child_.text
            serial_number_ = self.gds_validate_string(serial_number_, node, 'serial_number')
            self.serial_number = serial_number_
        elif nodeName_ == 'debug':
            debug_ = child_.text
            debug_ = self.gds_validate_string(debug_, node, 'debug')
            self.debug = debug_
        elif nodeName_ == 'multi_serial_numbers':
            obj_ = complex_multi_serial_numbers.factory()
            obj_.build(child_)
            self.set_multi_serial_numbers(obj_)
        elif nodeName_ == 'exponent':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError), exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            ival_ = self.gds_validate_integer(ival_, node, 'exponent')
            self.exponent = ival_
        elif nodeName_ == 'object_id':
            obj_ = complex_oid.factory()
            obj_.build(child_)
            self.set_object_id(obj_)
        elif nodeName_ == 'pmbl_properties':
            obj_ = complex_pmbl_properties.factory()
            obj_.build(child_)
            self.set_pmbl_properties(obj_)
        elif nodeName_ == 'cass_capability':
            cass_capability_ = child_.text
            cass_capability_ = self.gds_validate_string(cass_capability_, node, 'cass_capability')
            self.cass_capability = cass_capability_
        elif nodeName_ == 'hash_pageseg_as_segment':
            sval_ = child_.text
            if sval_ in ('true', '1'):
                ival_ = True
            elif sval_ in ('false', '0'):
                ival_ = False
            else:
                raise_parse_error(child_, 'requires boolean')
            ival_ = self.gds_validate_boolean(ival_, node, 'hash_pageseg_as_segment')
            self.hash_pageseg_as_segment = ival_
        elif nodeName_ == 'hash_algorithm':
            hash_algorithm_ = child_.text
            hash_algorithm_ = self.gds_validate_string(hash_algorithm_, node, 'hash_algorithm')
            self.hash_algorithm = hash_algorithm_
        elif nodeName_ == 'segment_hash_algorithm':
            segment_hash_algorithm_ = child_.text
            segment_hash_algorithm_ = self.gds_validate_string(segment_hash_algorithm_, node, 'segment_hash_algorithm')
            self.segment_hash_algorithm = segment_hash_algorithm_
        elif nodeName_ == 'cass_attest_cert':
            cass_attest_cert_ = child_.text
            cass_attest_cert_ = self.gds_validate_string(cass_attest_cert_, node, 'cass_attest_cert')
            self.cass_attest_cert = cass_attest_cert_
        elif nodeName_ == 'rsa_padding':
            rsa_padding_ = child_.text
            rsa_padding_ = self.gds_validate_string(rsa_padding_, node, 'rsa_padding')
            self.rsa_padding = rsa_padding_
        elif nodeName_ == 'hmac':
            sval_ = child_.text
            if sval_ in ('true', '1'):
                ival_ = True
            elif sval_ in ('false', '0'):
                ival_ = False
            else:
                raise_parse_error(child_, 'requires boolean')
            ival_ = self.gds_validate_boolean(ival_, node, 'hmac')
            self.hmac = ival_
        elif nodeName_ == 'secboot_version':
            secboot_version_ = child_.text
            secboot_version_ = self.gds_validate_string(secboot_version_, node, 'secboot_version')
            self.secboot_version = secboot_version_
        elif nodeName_ == 'qti_sign':
            sval_ = child_.text
            if sval_ in ('true', '1'):
                ival_ = True
            elif sval_ in ('false', '0'):
                ival_ = False
            else:
                raise_parse_error(child_, 'requires boolean')
            ival_ = self.gds_validate_boolean(ival_, node, 'qti_sign')
            self.qti_sign = ival_
        elif nodeName_ == 'oem_sign':
            sval_ = child_.text
            if sval_ in ('true', '1'):
                ival_ = True
            elif sval_ in ('false', '0'):
                ival_ = False
            else:
                raise_parse_error(child_, 'requires boolean')
            ival_ = self.gds_validate_boolean(ival_, node, 'oem_sign')
            self.oem_sign = ival_
        elif nodeName_ == 'UIE_key':
            UIE_key_ = child_.text
            UIE_key_ = self.gds_validate_string(UIE_key_, node, 'UIE_key')
            self.UIE_key = UIE_key_
        elif nodeName_ == 'UIE_capability':
            UIE_capability_ = child_.text
            UIE_capability_ = self.gds_validate_string(UIE_capability_, node, 'UIE_capability')
            self.UIE_capability = UIE_capability_
        elif nodeName_ == 'UIE_server_cert_path':
            UIE_server_cert_path_ = child_.text
            UIE_server_cert_path_ = self.gds_validate_string(UIE_server_cert_path_, node, 'UIE_server_cert_path')
            self.UIE_server_cert_path = UIE_server_cert_path_
        elif nodeName_ == 'UIE_server_url':
            UIE_server_url_ = child_.text
            UIE_server_url_ = self.gds_validate_string(UIE_server_url_, node, 'UIE_server_url')
            self.UIE_server_url = UIE_server_url_
        elif nodeName_ == 'UIE_root_key_type':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError), exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            ival_ = self.gds_validate_integer(ival_, node, 'UIE_root_key_type')
            self.UIE_root_key_type = ival_
        elif nodeName_ == 'uie_key_switch_enable':
            uie_key_switch_enable_ = child_.text
            uie_key_switch_enable_ = self.gds_validate_string(uie_key_switch_enable_, node, 'uie_key_switch_enable')
            self.uie_key_switch_enable = uie_key_switch_enable_
        elif nodeName_ == 'oem_id_independent':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError), exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            ival_ = self.gds_validate_integer(ival_, node, 'oem_id_independent')
            self.oem_id_independent = ival_
        elif nodeName_ == 'revocation_enablement':
            revocation_enablement_ = child_.text
            revocation_enablement_ = self.gds_validate_string(revocation_enablement_, node, 'revocation_enablement')
            self.revocation_enablement = revocation_enablement_
        elif nodeName_ == 'activation_enablement':
            activation_enablement_ = child_.text
            activation_enablement_ = self.gds_validate_string(activation_enablement_, node, 'activation_enablement')
            self.activation_enablement = activation_enablement_
        elif nodeName_ == 'root_revoke_activate_enable':
            root_revoke_activate_enable_ = child_.text
            root_revoke_activate_enable_ = self.gds_validate_string(root_revoke_activate_enable_, node, 'root_revoke_activate_enable')
            self.root_revoke_activate_enable = root_revoke_activate_enable_
        elif nodeName_ == 'dsa_type':
            dsa_type_ = child_.text
            dsa_type_ = self.gds_validate_string(dsa_type_, node, 'dsa_type')
            self.dsa_type = dsa_type_
        elif nodeName_ == 'ecdsa_curve':
            ecdsa_curve_ = child_.text
            ecdsa_curve_ = self.gds_validate_string(ecdsa_curve_, node, 'ecdsa_curve')
            self.ecdsa_curve = ecdsa_curve_
        elif nodeName_ == 'multi_image_segment_addr':
            multi_image_segment_addr_ = child_.text
            multi_image_segment_addr_ = self.gds_validate_string(multi_image_segment_addr_, node, 'multi_image_segment_addr')
            self.multi_image_segment_addr = multi_image_segment_addr_
        elif nodeName_ == 'client_id':
            client_id_ = child_.text
            client_id_ = self.gds_validate_string(client_id_, node, 'client_id')
            self.client_id = client_id_
        elif nodeName_ == 'lib_id':
            lib_id_ = child_.text
            lib_id_ = self.gds_validate_string(lib_id_, node, 'lib_id')
            self.lib_id = lib_id_
        elif nodeName_ == 'image_entry':
            image_entry_ = child_.text
            image_entry_ = self.gds_validate_string(image_entry_, node, 'image_entry')
            self.image_entry = image_entry_
# end class complex_general_properties


class complex_multi_serial_numbers(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, serial=None):
        if serial is None:
            self.serial = []
        else:
            self.serial = serial
    def factory(*args_, **kwargs_):
        if complex_multi_serial_numbers.subclass:
            return complex_multi_serial_numbers.subclass(*args_, **kwargs_)
        else:
            return complex_multi_serial_numbers(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_serial(self): return self.serial
    def set_serial(self, serial): self.serial = serial
    def add_serial(self, value): self.serial.append(value)
    def insert_serial(self, index, value): self.serial[index] = value
    def export(self, outfile, level, namespace_='tns:', name_='complex_multi_serial_numbers', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='complex_multi_serial_numbers')
        if self.hasContent_():
            outfile.write('>\n')
            self.exportChildren(outfile, level + 1, namespace_, name_)
            showIndent(outfile, level)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='tns:', name_='complex_multi_serial_numbers'):
        pass
    def exportChildren(self, outfile, level, namespace_='tns:', name_='complex_multi_serial_numbers', fromsubclass_=False):
        for serial_ in self.serial:
            showIndent(outfile, level)
            outfile.write('<%sserial>%s</%sserial>\n' % (namespace_, self.gds_format_string(quote_xml(serial_).encode(ExternalEncoding), input_name='serial'), namespace_))
    def hasContent_(self):
        if (
            self.serial
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='complex_multi_serial_numbers'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        showIndent(outfile, level)
        outfile.write('serial=[\n')
        level += 1
        for serial_ in self.serial:
            showIndent(outfile, level)
            outfile.write('%s,\n' % quote_python(serial_).encode(ExternalEncoding))
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'serial':
            serial_ = child_.text
            serial_ = self.gds_validate_string(serial_, node, 'serial')
            self.serial.append(serial_)
# end class complex_multi_serial_numbers


class complex_parsegen(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, image_types_list=None):
        self.image_types_list = image_types_list
    def factory(*args_, **kwargs_):
        if complex_parsegen.subclass:
            return complex_parsegen.subclass(*args_, **kwargs_)
        else:
            return complex_parsegen(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_image_types_list(self): return self.image_types_list
    def set_image_types_list(self, image_types_list): self.image_types_list = image_types_list
    def export(self, outfile, level, namespace_='tns:', name_='complex_parsegen', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='complex_parsegen')
        if self.hasContent_():
            outfile.write('>\n')
            self.exportChildren(outfile, level + 1, namespace_, name_)
            showIndent(outfile, level)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='tns:', name_='complex_parsegen'):
        pass
    def exportChildren(self, outfile, level, namespace_='tns:', name_='complex_parsegen', fromsubclass_=False):
        if self.image_types_list is not None:
            self.image_types_list.export(outfile, level, namespace_, name_='image_types_list')
    def hasContent_(self):
        if (
            self.image_types_list is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='complex_parsegen'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.image_types_list is not None:
            showIndent(outfile, level)
            outfile.write('image_types_list=model_.complex_image_types_list(\n')
            self.image_types_list.exportLiteral(outfile, level, name_='image_types_list')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'image_types_list':
            obj_ = complex_image_types_list.factory()
            obj_.build(child_)
            self.set_image_types_list(obj_)
# end class complex_parsegen


class complex_image_types_list(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, image_type=None):
        if image_type is None:
            self.image_type = []
        else:
            self.image_type = image_type
    def factory(*args_, **kwargs_):
        if complex_image_types_list.subclass:
            return complex_image_types_list.subclass(*args_, **kwargs_)
        else:
            return complex_image_types_list(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_image_type(self): return self.image_type
    def set_image_type(self, image_type): self.image_type = image_type
    def add_image_type(self, value): self.image_type.append(value)
    def insert_image_type(self, index, value): self.image_type[index] = value
    def export(self, outfile, level, namespace_='tns:', name_='complex_image_types_list', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='complex_image_types_list')
        if self.hasContent_():
            outfile.write('>\n')
            self.exportChildren(outfile, level + 1, namespace_, name_)
            showIndent(outfile, level)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='tns:', name_='complex_image_types_list'):
        pass
    def exportChildren(self, outfile, level, namespace_='tns:', name_='complex_image_types_list', fromsubclass_=False):
        for image_type_ in self.image_type:
            image_type_.export(outfile, level, namespace_, name_='image_type')
    def hasContent_(self):
        if (
            self.image_type
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='complex_image_types_list'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        showIndent(outfile, level)
        outfile.write('image_type=[\n')
        level += 1
        for image_type_ in self.image_type:
            showIndent(outfile, level)
            outfile.write('model_.complex_image_type(\n')
            image_type_.exportLiteral(outfile, level, name_='complex_image_type')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'image_type':
            obj_ = complex_image_type.factory()
            obj_.build(child_)
            self.image_type.append(obj_)
# end class complex_image_types_list


class complex_image_type(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, id=None, file_type=None, mbn_properties=None, elf_properties=None, ewm_properties=None, pmbl_properties=None):
        self.id = _cast(None, id)
        self.file_type = file_type
        self.mbn_properties = mbn_properties
        self.elf_properties = elf_properties
        self.ewm_properties = ewm_properties
        self.pmbl_properties = pmbl_properties
    def factory(*args_, **kwargs_):
        if complex_image_type.subclass:
            return complex_image_type.subclass(*args_, **kwargs_)
        else:
            return complex_image_type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_file_type(self): return self.file_type
    def set_file_type(self, file_type): self.file_type = file_type
    def get_mbn_properties(self): return self.mbn_properties
    def set_mbn_properties(self, mbn_properties): self.mbn_properties = mbn_properties
    def get_elf_properties(self): return self.elf_properties
    def set_elf_properties(self, elf_properties): self.elf_properties = elf_properties
    def get_ewm_properties(self): return self.ewm_properties
    def set_ewm_properties(self, ewm_properties): self.ewm_properties = ewm_properties
    def get_pmbl_properties(self): return self.pmbl_properties
    def set_pmbl_properties(self, pmbl_properties): self.pmbl_properties = pmbl_properties
    def get_id(self): return self.id
    def set_id(self, id): self.id = id
    def export(self, outfile, level, namespace_='tns:', name_='complex_image_type', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='complex_image_type')
        if self.hasContent_():
            outfile.write('>\n')
            self.exportChildren(outfile, level + 1, namespace_, name_)
            showIndent(outfile, level)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='tns:', name_='complex_image_type'):
        if self.id is not None and 'id' not in already_processed:
            already_processed.append('id')
            outfile.write(' id=%s' % (self.gds_format_string(quote_attrib(self.id).encode(ExternalEncoding), input_name='id'), ))
    def exportChildren(self, outfile, level, namespace_='tns:', name_='complex_image_type', fromsubclass_=False):
        if self.file_type is not None:
            showIndent(outfile, level)
            outfile.write('<%sfile_type>%s</%sfile_type>\n' % (namespace_, self.gds_format_string(quote_xml(self.file_type).encode(ExternalEncoding), input_name='file_type'), namespace_))
        if self.mbn_properties is not None:
            self.mbn_properties.export(outfile, level, namespace_, name_='mbn_properties')
        if self.elf_properties is not None:
            self.elf_properties.export(outfile, level, namespace_, name_='elf_properties')
        if self.ewm_properties is not None:
            self.ewm_properties.export(outfile, level, namespace_, name_='ewm_properties')
        if self.pmbl_properties is not None:
            self.pmbl_properties.export(outfile, level, namespace_, name_='pmbl_properties')
    def hasContent_(self):
        if (
            self.file_type is not None or
            self.mbn_properties is not None or
            self.elf_properties is not None or
            self.ewm_properties is not None or
            self.pmbl_properties is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='complex_image_type'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.id is not None and 'id' not in already_processed:
            already_processed.append('id')
            showIndent(outfile, level)
            outfile.write('id = "%s",\n' % (self.id,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.file_type is not None:
            showIndent(outfile, level)
            outfile.write('file_type=%s,\n' % quote_python(self.file_type).encode(ExternalEncoding))
        if self.mbn_properties is not None:
            showIndent(outfile, level)
            outfile.write('mbn_properties=model_.complex_mbn_properties(\n')
            self.mbn_properties.exportLiteral(outfile, level, name_='mbn_properties')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.elf_properties is not None:
            showIndent(outfile, level)
            outfile.write('elf_properties=model_.complex_elf_properties(\n')
            self.elf_properties.exportLiteral(outfile, level, name_='elf_properties')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.ewm_properties is not None:
            showIndent(outfile, level)
            outfile.write('ewm_properties=model_.complex_ewm_properties(\n')
            self.ewm_properties.exportLiteral(outfile, level, name_='ewm_properties')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.pmbl_properties is not None:
            showIndent(outfile, level)
            outfile.write('pmbl_properties=model_.complex_pmbl_properties(\n')
            self.pmbl_properties.exportLiteral(outfile, level, name_='pmbl_properties')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('id', node)
        if value is not None and 'id' not in already_processed:
            already_processed.append('id')
            self.id = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'file_type':
            file_type_ = child_.text
            file_type_ = self.gds_validate_string(file_type_, node, 'file_type')
            self.file_type = file_type_
        elif nodeName_ == 'mbn_properties':
            obj_ = complex_mbn_properties.factory()
            obj_.build(child_)
            self.set_mbn_properties(obj_)
        elif nodeName_ == 'elf_properties':
            obj_ = complex_elf_properties.factory()
            obj_.build(child_)
            self.set_elf_properties(obj_)
        elif nodeName_ == 'ewm_properties':
            obj_ = complex_ewm_properties.factory()
            obj_.build(child_)
            self.set_ewm_properties(obj_)
        elif nodeName_ == 'pmbl_properties':
            obj_ = complex_pmbl_properties.factory()
            obj_.build(child_)
            self.set_pmbl_properties(obj_)
# end class complex_image_type


class complex_mbn_properties(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, header_size=None):
        self.header_size = header_size
    def factory(*args_, **kwargs_):
        if complex_mbn_properties.subclass:
            return complex_mbn_properties.subclass(*args_, **kwargs_)
        else:
            return complex_mbn_properties(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_header_size(self): return self.header_size
    def set_header_size(self, header_size): self.header_size = header_size
    def export(self, outfile, level, namespace_='tns:', name_='complex_mbn_properties', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='complex_mbn_properties')
        if self.hasContent_():
            outfile.write('>\n')
            self.exportChildren(outfile, level + 1, namespace_, name_)
            showIndent(outfile, level)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='tns:', name_='complex_mbn_properties'):
        pass
    def exportChildren(self, outfile, level, namespace_='tns:', name_='complex_mbn_properties', fromsubclass_=False):
        if self.header_size is not None:
            showIndent(outfile, level)
            outfile.write('<%sheader_size>%s</%sheader_size>\n' % (namespace_, self.gds_format_integer(self.header_size, input_name='header_size'), namespace_))
    def hasContent_(self):
        if (
            self.header_size is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='complex_mbn_properties'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.header_size is not None:
            showIndent(outfile, level)
            outfile.write('header_size=%d,\n' % self.header_size)
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'header_size':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError), exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            ival_ = self.gds_validate_integer(ival_, node, 'header_size')
            self.header_size = ival_
# end class complex_mbn_properties


class complex_pmbl_properties(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, preamble_size=None, has_magic_num=None, ota_enabled=None, page_size=None, num_of_pages=None, min_size_with_pad=None):
        self.preamble_size = preamble_size
        self.has_magic_num = has_magic_num
        self.ota_enabled = ota_enabled
        self.page_size = page_size
        self.num_of_pages = num_of_pages
        self.min_size_with_pad = min_size_with_pad
    def factory(*args_, **kwargs_):
        if complex_pmbl_properties.subclass:
            return complex_pmbl_properties.subclass(*args_, **kwargs_)
        else:
            return complex_pmbl_properties(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_preamble_size(self): return self.preamble_size
    def set_preamble_size(self, preamble_size): self.preamble_size = preamble_size
    def get_has_magic_num(self): return self.has_magic_num
    def set_has_magic_num(self, has_magic_num): self.has_magic_num = has_magic_num
    def get_ota_enabled(self): return self.ota_enabled
    def set_ota_enabled(self, ota_enabled): self.ota_enabled = ota_enabled
    def get_page_size(self): return self.page_size
    def set_page_size(self, page_size): self.page_size = page_size
    def get_num_of_pages(self): return self.num_of_pages
    def set_num_of_pages(self, num_of_pages): self.num_of_pages = num_of_pages
    def get_min_size_with_pad(self): return self.min_size_with_pad
    def set_min_size_with_pad(self, min_size_with_pad): self.min_size_with_pad = min_size_with_pad
    def export(self, outfile, level, namespace_='tns:', name_='complex_pmbl_properties', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='complex_pmbl_properties')
        if self.hasContent_():
            outfile.write('>\n')
            self.exportChildren(outfile, level + 1, namespace_, name_)
            showIndent(outfile, level)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='tns:', name_='complex_pmbl_properties'):
        pass
    def exportChildren(self, outfile, level, namespace_='tns:', name_='complex_pmbl_properties', fromsubclass_=False):
        if self.preamble_size is not None:
            showIndent(outfile, level)
            outfile.write('<%spreamble_size>%s</%spreamble_size>\n' % (namespace_, self.gds_format_integer(self.preamble_size, input_name='preamble_size'), namespace_))
        if self.has_magic_num is not None:
            showIndent(outfile, level)
            outfile.write('<%shas_magic_num>%s</%shas_magic_num>\n' % (namespace_, self.gds_format_boolean(self.gds_str_lower(str(self.has_magic_num)), input_name='has_magic_num'), namespace_))
        if self.ota_enabled is not None:
            showIndent(outfile, level)
            outfile.write('<%sota_enabled>%s</%sota_enabled>\n' % (namespace_, self.gds_format_boolean(self.gds_str_lower(str(self.ota_enabled)), input_name='ota_enabled'), namespace_))
        if self.page_size is not None:
            showIndent(outfile, level)
            outfile.write('<%spage_size>%s</%spage_size>\n' % (namespace_, self.gds_format_integer(self.page_size, input_name='page_size'), namespace_))
        if self.num_of_pages is not None:
            showIndent(outfile, level)
            outfile.write('<%snum_of_pages>%s</%snum_of_pages>\n' % (namespace_, self.gds_format_integer(self.num_of_pages, input_name='num_of_pages'), namespace_))
        if self.min_size_with_pad is not None:
            showIndent(outfile, level)
            outfile.write('<%smin_size_with_pad>%s</%smin_size_with_pad>\n' % (namespace_, self.gds_format_integer(self.min_size_with_pad, input_name='min_size_with_pad'), namespace_))
    def hasContent_(self):
        if (
            self.preamble_size is not None or
            self.has_magic_num is not None or
            self.ota_enabled is not None or
            self.page_size is not None or
            self.num_of_pages is not None or
            self.min_size_with_pad is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='complex_pmbl_properties'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.preamble_size is not None:
            showIndent(outfile, level)
            outfile.write('preamble_size=%d,\n' % self.preamble_size)
        if self.has_magic_num is not None:
            showIndent(outfile, level)
            outfile.write('has_magic_num=%s,\n' % self.has_magic_num)
        if self.ota_enabled is not None:
            showIndent(outfile, level)
            outfile.write('ota_enabled=%s,\n' % self.ota_enabled)
        if self.page_size is not None:
            showIndent(outfile, level)
            outfile.write('page_size=%d,\n' % self.page_size)
        if self.num_of_pages is not None:
            showIndent(outfile, level)
            outfile.write('num_of_pages=%d,\n' % self.num_of_pages)
        if self.min_size_with_pad is not None:
            showIndent(outfile, level)
            outfile.write('min_size_with_pad=%d,\n' % self.min_size_with_pad)
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'preamble_size':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError), exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            ival_ = self.gds_validate_integer(ival_, node, 'preamble_size')
            self.preamble_size = ival_
        elif nodeName_ == 'has_magic_num':
            sval_ = child_.text
            if sval_ in ('true', '1'):
                ival_ = True
            elif sval_ in ('false', '0'):
                ival_ = False
            else:
                raise_parse_error(child_, 'requires boolean')
            ival_ = self.gds_validate_boolean(ival_, node, 'has_magic_num')
            self.has_magic_num = ival_
        elif nodeName_ == 'ota_enabled':
            sval_ = child_.text
            if sval_ in ('true', '1'):
                ival_ = True
            elif sval_ in ('false', '0'):
                ival_ = False
            else:
                raise_parse_error(child_, 'requires boolean')
            ival_ = self.gds_validate_boolean(ival_, node, 'ota_enabled')
            self.ota_enabled = ival_
        elif nodeName_ == 'page_size':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError), exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            ival_ = self.gds_validate_integer(ival_, node, 'page_size')
            self.page_size = ival_
        elif nodeName_ == 'num_of_pages':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError), exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            ival_ = self.gds_validate_integer(ival_, node, 'num_of_pages')
            self.num_of_pages = ival_
        elif nodeName_ == 'min_size_with_pad':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError), exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            ival_ = self.gds_validate_integer(ival_, node, 'min_size_with_pad')
            self.min_size_with_pad = ival_
# end class complex_pmbl_properties


class complex_elf_properties(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, has_hash_table=None, has_multi_image_segment=False, has_license_manager_segment=False, has_sections=False, max_elf_segments=None, image_type=None, hash_seg_placement=None, validate_ph_addrs=None, validate_vir_addrs=None):
        self.has_hash_table = has_hash_table
        self.has_multi_image_segment = has_multi_image_segment
        self.has_license_manager_segment = has_license_manager_segment
        self.has_sections = has_sections
        self.max_elf_segments = max_elf_segments
        self.image_type = image_type
        self.hash_seg_placement = hash_seg_placement
        self.validate_ph_addrs = validate_ph_addrs
        self.validate_vir_addrs = validate_vir_addrs
    def factory(*args_, **kwargs_):
        if complex_elf_properties.subclass:
            return complex_elf_properties.subclass(*args_, **kwargs_)
        else:
            return complex_elf_properties(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_has_hash_table(self): return self.has_hash_table
    def set_has_hash_table(self, has_hash_table): self.has_hash_table = has_hash_table
    def get_has_multi_image_segment(self): return self.has_multi_image_segment
    def set_has_multi_image_segment(self, has_multi_image_segment): self.has_multi_image_segment = has_multi_image_segment
    def get_has_license_manager_segment(self): return self.has_license_manager_segment
    def set_has_license_manager_segment(self, has_license_manager_segment): self.has_license_manager_segment = has_license_manager_segment
    def get_has_sections(self): return self.has_sections
    def set_has_sections(self, has_sections): self.has_sections = has_sections
    def get_max_elf_segments(self): return self.max_elf_segments
    def set_max_elf_segments(self, max_elf_segments): self.max_elf_segments = max_elf_segments
    def get_image_type(self): return self.image_type
    def set_image_type(self, image_type): self.image_type = image_type
    def get_hash_seg_placement(self): return self.hash_seg_placement
    def set_hash_seg_placement(self, hash_seg_placement): self.hash_seg_placement = hash_seg_placement
    def get_validate_ph_addrs(self): return self.validate_ph_addrs
    def set_validate_ph_addrs(self, validate_ph_addrs): self.validate_ph_addrs = validate_ph_addrs
    def get_validate_vir_addrs(self): return self.validate_vir_addrs
    def set_validate_vir_addrs(self, validate_vir_addrs): self.validate_vir_addrs = validate_vir_addrs
    def export(self, outfile, level, namespace_='tns:', name_='complex_elf_properties', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='complex_elf_properties')
        if self.hasContent_():
            outfile.write('>\n')
            self.exportChildren(outfile, level + 1, namespace_, name_)
            showIndent(outfile, level)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='tns:', name_='complex_elf_properties'):
        pass
    def exportChildren(self, outfile, level, namespace_='tns:', name_='complex_elf_properties', fromsubclass_=False):
        if self.has_hash_table is not None:
            showIndent(outfile, level)
            outfile.write('<%shas_hash_table>%s</%shas_hash_table>\n' % (namespace_, self.gds_format_boolean(self.gds_str_lower(str(self.has_hash_table)), input_name='has_hash_table'), namespace_))
        if self.has_multi_image_segment is not None:
            showIndent(outfile, level)
            outfile.write('<%shas_multi_image_segment>%s</%shas_multi_image_segment>\n' % (namespace_, self.gds_format_boolean(self.gds_str_lower(str(self.has_multi_image_segment)), input_name='has_multi_image_segment'), namespace_))
        if self.has_license_manager_segment is not None:
            showIndent(outfile, level)
            outfile.write('<%shas_license_manager_segment>%s</%shas_license_manager_segment>\n' % (namespace_, self.gds_format_boolean(self.gds_str_lower(str(self.has_license_manager_segment)), input_name='has_license_manager_segment'), namespace_))
        if self.has_sections is not None:
            showIndent(outfile, level)
            outfile.write('<%shas_sections>%s</%shas_sections>\n' % (namespace_, self.gds_format_boolean(self.gds_str_lower(str(self.has_sections)), input_name='has_sections'), namespace_))
        if self.max_elf_segments is not None:
            showIndent(outfile, level)
            outfile.write('<%smax_elf_segments>%s</%smax_elf_segments>\n' % (namespace_, self.gds_format_integer(self.max_elf_segments, input_name='max_elf_segments'), namespace_))
        if self.image_type is not None:
            showIndent(outfile, level)
            outfile.write('<%simage_type>%s</%simage_type>\n' % (namespace_, self.gds_format_integer(self.image_type, input_name='image_type'), namespace_))
        if self.hash_seg_placement is not None:
            showIndent(outfile, level)
            outfile.write('<%shash_seg_placement>%s</%shash_seg_placement>\n' % (namespace_, self.gds_format_string(quote_xml(self.hash_seg_placement).encode(ExternalEncoding), input_name='hash_seg_placement'), namespace_))
        if self.validate_ph_addrs is not None:
            showIndent(outfile, level)
            outfile.write('<%svalidate_ph_addrs>%s</%svalidate_ph_addrs>\n' % (namespace_, self.gds_format_boolean(self.gds_str_lower(str(self.validate_ph_addrs)), input_name='validate_ph_addrs'), namespace_))
        if self.validate_vir_addrs is not None:
            showIndent(outfile, level)
            outfile.write('<%svalidate_vir_addrs>%s</%svalidate_vir_addrs>\n' % (namespace_, self.gds_format_boolean(self.gds_str_lower(str(self.validate_vir_addrs)), input_name='validate_vir_addrs'), namespace_))
    def hasContent_(self):
        if (
            self.has_hash_table is not None or
            self.has_multi_image_segment is not None or
            self.has_license_manager_segment is not None or
            self.has_sections is not None or
            self.max_elf_segments is not None or
            self.image_type is not None or
            self.hash_seg_placement is not None or
            self.validate_ph_addrs is not None or
            self.validate_vir_addrs is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='complex_elf_properties'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.has_hash_table is not None:
            showIndent(outfile, level)
            outfile.write('has_hash_table=%s,\n' % self.has_hash_table)
        if self.has_multi_image_segment is not None:
            showIndent(outfile, level)
            outfile.write('has_multi_image_segment=%s,\n' % self.has_multi_image_segment)
        if self.has_license_manager_segment is not None:
            showIndent(outfile, level)
            outfile.write('has_license_manager_segment=%s,\n' % self.has_license_manager_segment)
        if self.has_sections is not None:
            showIndent(outfile, level)
            outfile.write('has_sections=%s,\n' % self.has_sections)
        if self.max_elf_segments is not None:
            showIndent(outfile, level)
            outfile.write('max_elf_segments=%d,\n' % self.max_elf_segments)
        if self.image_type is not None:
            showIndent(outfile, level)
            outfile.write('image_type=%d,\n' % self.image_type)
        if self.hash_seg_placement is not None:
            showIndent(outfile, level)
            outfile.write('hash_seg_placement=%s,\n' % quote_python(self.hash_seg_placement).encode(ExternalEncoding))
        if self.validate_ph_addrs is not None:
            showIndent(outfile, level)
            outfile.write('validate_ph_addrs=%s,\n' % self.validate_ph_addrs)
        if self.validate_vir_addrs is not None:
            showIndent(outfile, level)
            outfile.write('validate_vir_addrs=%s,\n' % self.validate_vir_addrs)
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'has_hash_table':
            sval_ = child_.text
            if sval_ in ('true', '1'):
                ival_ = True
            elif sval_ in ('false', '0'):
                ival_ = False
            else:
                raise_parse_error(child_, 'requires boolean')
            ival_ = self.gds_validate_boolean(ival_, node, 'has_hash_table')
            self.has_hash_table = ival_
        elif nodeName_ == 'has_multi_image_segment':
            sval_ = child_.text
            if sval_ in ('true', '1'):
                ival_ = True
            elif sval_ in ('false', '0'):
                ival_ = False
            else:
                raise_parse_error(child_, 'requires boolean')
            ival_ = self.gds_validate_boolean(ival_, node, 'has_multi_image_segment')
            self.has_multi_image_segment = ival_
        elif nodeName_ == 'has_license_manager_segment':
            sval_ = child_.text
            if sval_ in ('true', '1'):
                ival_ = True
            elif sval_ in ('false', '0'):
                ival_ = False
            else:
                raise_parse_error(child_, 'requires boolean')
            ival_ = self.gds_validate_boolean(ival_, node, 'has_license_manager_segment')
            self.has_license_manager_segment = ival_
        elif nodeName_ == 'has_sections':
            sval_ = child_.text
            if sval_ in ('true', '1'):
                ival_ = True
            elif sval_ in ('false', '0'):
                ival_ = False
            else:
                raise_parse_error(child_, 'requires boolean')
            ival_ = self.gds_validate_boolean(ival_, node, 'has_sections')
            self.has_sections = ival_
        elif nodeName_ == 'max_elf_segments':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError), exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            ival_ = self.gds_validate_integer(ival_, node, 'max_elf_segments')
            self.max_elf_segments = ival_
        elif nodeName_ == 'image_type':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError), exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            ival_ = self.gds_validate_integer(ival_, node, 'image_type')
            self.image_type = ival_
        elif nodeName_ == 'hash_seg_placement':
            hash_seg_placement_ = child_.text
            hash_seg_placement_ = self.gds_validate_string(hash_seg_placement_, node, 'hash_seg_placement')
            self.hash_seg_placement = hash_seg_placement_
        elif nodeName_ == 'validate_ph_addrs':
            sval_ = child_.text
            if sval_ in ('true', '1'):
                ival_ = True
            elif sval_ in ('false', '0'):
                ival_ = False
            else:
                raise_parse_error(child_, 'requires boolean')
            ival_ = self.gds_validate_boolean(ival_, node, 'validate_ph_addrs')
            self.validate_ph_addrs = ival_
        elif nodeName_ == 'validate_vir_addrs':
            sval_ = child_.text
            if sval_ in ('true', '1'):
                ival_ = True
            elif sval_ in ('false', '0'):
                ival_ = False
            else:
                raise_parse_error(child_, 'requires boolean')
            ival_ = self.gds_validate_boolean(ival_, node, 'validate_vir_addrs')
            self.validate_vir_addrs = ival_
# end class complex_elf_properties


class complex_ewm_properties(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, image_entry=None, relocatable=None):
        self.image_entry = image_entry
        self.relocatable = relocatable
    def factory(*args_, **kwargs_):
        if complex_ewm_properties.subclass:
            return complex_ewm_properties.subclass(*args_, **kwargs_)
        else:
            return complex_ewm_properties(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_image_entry(self): return self.image_entry
    def set_image_entry(self, image_entry): self.image_entry = image_entry
    def get_relocatable(self): return self.relocatable
    def set_relocatable(self, relocatable): self.relocatable = relocatable
    def export(self, outfile, level, namespace_='tns:', name_='complex_ewm_properties', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='complex_ewm_properties')
        if self.hasContent_():
            outfile.write('>\n')
            self.exportChildren(outfile, level + 1, namespace_, name_)
            showIndent(outfile, level)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='tns:', name_='complex_ewm_properties'):
        pass
    def exportChildren(self, outfile, level, namespace_='tns:', name_='complex_ewm_properties', fromsubclass_=False):
        if self.image_entry is not None:
            showIndent(outfile, level)
            outfile.write('<%simage_entry>%s</%simage_entry>\n' % (namespace_, self.gds_format_string(quote_xml(self.image_entry).encode(ExternalEncoding), input_name='image_entry'), namespace_))
        if self.relocatable is not None:
            showIndent(outfile, level)
            outfile.write('<%srelocatable>%s</%srelocatable>\n' % (namespace_, self.gds_format_boolean(self.gds_str_lower(str(self.relocatable)), input_name='relocatable'), namespace_))
    def hasContent_(self):
        if (
            self.image_entry is not None or
            self.relocatable is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='complex_ewm_properties'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.image_entry is not None:
            showIndent(outfile, level)
            outfile.write('image_entry=%s,\n' % quote_python(self.image_entry).encode(ExternalEncoding))
        if self.relocatable is not None:
            showIndent(outfile, level)
            outfile.write('relocatable=%s,\n' % self.relocatable)
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'image_entry':
            image_entry_ = child_.text
            image_entry_ = self.gds_validate_string(image_entry_, node, 'image_entry')
            self.image_entry = image_entry_
        elif nodeName_ == 'relocatable':
            sval_ = child_.text
            if sval_ in ('true', '1'):
                ival_ = True
            elif sval_ in ('false', '0'):
                ival_ = False
            else:
                raise_parse_error(child_, 'requires boolean')
            ival_ = self.gds_validate_boolean(ival_, node, 'relocatable')
            self.relocatable = ival_
# end class complex_ewm_properties


class complex_signing(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, signer_attributes=None):
        self.signer_attributes = signer_attributes
    def factory(*args_, **kwargs_):
        if complex_signing.subclass:
            return complex_signing.subclass(*args_, **kwargs_)
        else:
            return complex_signing(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_signer_attributes(self): return self.signer_attributes
    def set_signer_attributes(self, signer_attributes): self.signer_attributes = signer_attributes
    def export(self, outfile, level, namespace_='tns:', name_='complex_signing', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='complex_signing')
        if self.hasContent_():
            outfile.write('>\n')
            self.exportChildren(outfile, level + 1, namespace_, name_)
            showIndent(outfile, level)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='tns:', name_='complex_signing'):
        pass
    def exportChildren(self, outfile, level, namespace_='tns:', name_='complex_signing', fromsubclass_=False):
        if self.signer_attributes is not None:
            self.signer_attributes.export(outfile, level, namespace_, name_='signer_attributes', )
    def hasContent_(self):
        if (
            self.signer_attributes is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='complex_signing'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.signer_attributes is not None:
            showIndent(outfile, level)
            outfile.write('signer_attributes=model_.complex_signer_attributes(\n')
            self.signer_attributes.exportLiteral(outfile, level, name_='signer_attributes')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'signer_attributes':
            obj_ = complex_signer_attributes.factory()
            obj_.build(child_)
            self.set_signer_attributes(obj_)
# end class complex_signing


class complex_oid(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, max=None, name=None, min=None):
        self.max = _cast(None, max)
        self.name = _cast(None, name)
        self.min = _cast(None, min)
        pass
    def factory(*args_, **kwargs_):
        if complex_oid.subclass:
            return complex_oid.subclass(*args_, **kwargs_)
        else:
            return complex_oid(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_max(self): return self.max
    def set_max(self, max): self.max = max
    def get_name(self): return self.name
    def set_name(self, name): self.name = name
    def get_min(self): return self.min
    def set_min(self, min): self.min = min
    def export(self, outfile, level, namespace_='tns:', name_='complex_oid', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='complex_oid')
        if self.hasContent_():
            outfile.write('>\n')
            self.exportChildren(outfile, level + 1, namespace_, name_)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='tns:', name_='complex_oid'):
        if self.max is not None and 'max' not in already_processed:
            already_processed.append('max')
            outfile.write(' max=%s' % (self.gds_format_string(quote_attrib(self.max).encode(ExternalEncoding), input_name='max'), ))
        if self.name is not None and 'name' not in already_processed:
            already_processed.append('name')
            outfile.write(' name=%s' % (self.gds_format_string(quote_attrib(self.name).encode(ExternalEncoding), input_name='name'), ))
        if self.min is not None and 'min' not in already_processed:
            already_processed.append('min')
            outfile.write(' min=%s' % (self.gds_format_string(quote_attrib(self.min).encode(ExternalEncoding), input_name='min'), ))
    def exportChildren(self, outfile, level, namespace_='tns:', name_='complex_oid', fromsubclass_=False):
        pass
    def hasContent_(self):
        if (

            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='complex_oid'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.max is not None and 'max' not in already_processed:
            already_processed.append('max')
            showIndent(outfile, level)
            outfile.write('max = "%s",\n' % (self.max,))
        if self.name is not None and 'name' not in already_processed:
            already_processed.append('name')
            showIndent(outfile, level)
            outfile.write('name = "%s",\n' % (self.name,))
        if self.min is not None and 'min' not in already_processed:
            already_processed.append('min')
            showIndent(outfile, level)
            outfile.write('min = "%s",\n' % (self.min,))
    def exportLiteralChildren(self, outfile, level, name_):
        pass
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('max', node)
        if value is not None and 'max' not in already_processed:
            already_processed.append('max')
            self.max = value
        value = find_attr_value_('name', node)
        if value is not None and 'name' not in already_processed:
            already_processed.append('name')
            self.name = value
        value = find_attr_value_('min', node)
        if value is not None and 'min' not in already_processed:
            already_processed.append('min')
            self.min = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class complex_oid


class complex_signer_attributes(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, cass_signer_attributes=None, remote_client_signer_attributes=None, remote_signer_attributes=None):
        self.cass_signer_attributes = cass_signer_attributes
        self.remote_client_signer_attributes = remote_client_signer_attributes
        self.remote_signer_attributes = remote_signer_attributes
    def factory(*args_, **kwargs_):
        if complex_signer_attributes.subclass:
            return complex_signer_attributes.subclass(*args_, **kwargs_)
        else:
            return complex_signer_attributes(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_cass_signer_attributes(self): return self.cass_signer_attributes
    def set_cass_signer_attributes(self, cass_signer_attributes): self.cass_signer_attributes = cass_signer_attributes
    def get_remote_client_signer_attributes(self): return self.remote_client_signer_attributes
    def set_remote_client_signer_attributes(self, remote_client_signer_attributes): self.remote_client_signer_attributes = remote_client_signer_attributes
    def get_remote_signer_attributes(self): return self.remote_signer_attributes
    def set_remote_signer_attributes(self, remote_signer_attributes): self.remote_signer_attributes = remote_signer_attributes
    def export(self, outfile, level, namespace_='tns:', name_='complex_signer_attributes', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='complex_signer_attributes')
        if self.hasContent_():
            outfile.write('>\n')
            self.exportChildren(outfile, level + 1, namespace_, name_)
            showIndent(outfile, level)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='tns:', name_='complex_signer_attributes'):
        pass
    def exportChildren(self, outfile, level, namespace_='tns:', name_='complex_signer_attributes', fromsubclass_=False):
        if self.cass_signer_attributes is not None:
            self.cass_signer_attributes.export(outfile, level, namespace_, name_='cass_signer_attributes')
        if self.remote_client_signer_attributes is not None:
            self.remote_client_signer_attributes.export(outfile, level, namespace_, name_='remote_client_signer_attributes')
        if self.remote_signer_attributes is not None:
            self.remote_signer_attributes.export(outfile, level, namespace_, name_='remote_signer_attributes')
    def hasContent_(self):
        if (
            self.cass_signer_attributes is not None or
            self.remote_client_signer_attributes is not None or
            self.remote_signer_attributes is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='complex_signer_attributes'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.cass_signer_attributes is not None:
            showIndent(outfile, level)
            outfile.write('cass_signer_attributes=model_.complex_cass_signer_attributes(\n')
            self.cass_signer_attributes.exportLiteral(outfile, level, name_='cass_signer_attributes')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.remote_client_signer_attributes is not None:
            showIndent(outfile, level)
            outfile.write('remote_client_signer_attributes=model_.complex_remote_client_signer_attributes(\n')
            self.remote_client_signer_attributes.exportLiteral(outfile, level, name_='remote_client_signer_attributes')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.remote_signer_attributes is not None:
            showIndent(outfile, level)
            outfile.write('remote_signer_attributes=model_.complex_remote_signer_attributes(\n')
            self.remote_signer_attributes.exportLiteral(outfile, level, name_='remote_signer_attributes')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'cass_signer_attributes':
            obj_ = complex_cass_signer_attributes.factory()
            obj_.build(child_)
            self.set_cass_signer_attributes(obj_)
        elif nodeName_ == 'remote_client_signer_attributes':
            obj_ = complex_remote_client_signer_attributes.factory()
            obj_.build(child_)
            self.set_remote_client_signer_attributes(obj_)
        elif nodeName_ == 'remote_signer_attributes':
            obj_ = complex_remote_signer_attributes.factory()
            obj_.build(child_)
            self.set_remote_signer_attributes(obj_)
# end class complex_signer_attributes


class complex_cass_signer_attributes(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, server=None, user_identity=None):
        self.server = server
        self.user_identity = user_identity
    def factory(*args_, **kwargs_):
        if complex_cass_signer_attributes.subclass:
            return complex_cass_signer_attributes.subclass(*args_, **kwargs_)
        else:
            return complex_cass_signer_attributes(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_server(self): return self.server
    def set_server(self, server): self.server = server
    def get_user_identity(self): return self.user_identity
    def set_user_identity(self, user_identity): self.user_identity = user_identity
    def export(self, outfile, level, namespace_='tns:', name_='complex_cass_signer_attributes', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='complex_cass_signer_attributes')
        if self.hasContent_():
            outfile.write('>\n')
            self.exportChildren(outfile, level + 1, namespace_, name_)
            showIndent(outfile, level)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='tns:', name_='complex_cass_signer_attributes'):
        pass
    def exportChildren(self, outfile, level, namespace_='tns:', name_='complex_cass_signer_attributes', fromsubclass_=False):
        if self.server is not None:
            self.server.export(outfile, level, namespace_, name_='server')
        if self.user_identity is not None:
            self.user_identity.export(outfile, level, namespace_, name_='user_identity', )
    def hasContent_(self):
        if (
            self.server is not None or
            self.user_identity is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='complex_cass_signer_attributes'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.server is not None:
            showIndent(outfile, level)
            outfile.write('server=model_.complex_server(\n')
            self.server.exportLiteral(outfile, level, name_='server')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.user_identity is not None:
            showIndent(outfile, level)
            outfile.write('user_identity=model_.complex_user_identity(\n')
            self.user_identity.exportLiteral(outfile, level, name_='user_identity')
            showIndent(outfile, level)
            outfile.write('),\n')
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'server':
            obj_ = complex_server.factory()
            obj_.build(child_)
            self.set_server(obj_)
        elif nodeName_ == 'user_identity':
            obj_ = complex_user_identity.factory()
            obj_.build(child_)
            self.set_user_identity(obj_)
# end class complex_cass_signer_attributes


class complex_remote_client_signer_attributes(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, send_signing_overrides=None):
        self.send_signing_overrides = send_signing_overrides
    def factory(*args_, **kwargs_):
        if complex_remote_client_signer_attributes.subclass:
            return complex_remote_client_signer_attributes.subclass(*args_, **kwargs_)
        else:
            return complex_remote_client_signer_attributes(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_send_signing_overrides(self): return self.send_signing_overrides
    def set_send_signing_overrides(self, send_signing_overrides): self.send_signing_overrides = send_signing_overrides
    def export(self, outfile, level, namespace_='tns:', name_='complex_remote_client_signer_attributes', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='complex_remote_client_signer_attributes')
        if self.hasContent_():
            outfile.write('>\n')
            self.exportChildren(outfile, level + 1, namespace_, name_)
            showIndent(outfile, level)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='tns:', name_='complex_remote_client_signer_attributes'):
        pass
    def exportChildren(self, outfile, level, namespace_='tns:', name_='complex_remote_client_signer_attributes', fromsubclass_=False):
        if self.send_signing_overrides is not None:
            showIndent(outfile, level)
            outfile.write('<%ssend_signing_overrides>%s</%ssend_signing_overrides>\n' % (namespace_, self.gds_format_boolean(self.gds_str_lower(str(self.send_signing_overrides)), input_name='send_signing_overrides'), namespace_))
    def hasContent_(self):
        if (
            self.send_signing_overrides is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='complex_remote_client_signer_attributes'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.send_signing_overrides is not None:
            showIndent(outfile, level)
            outfile.write('send_signing_overrides=%s,\n' % self.send_signing_overrides)
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'send_signing_overrides':
            sval_ = child_.text
            if sval_ in ('true', '1'):
                ival_ = True
            elif sval_ in ('false', '0'):
                ival_ = False
            else:
                raise_parse_error(child_, 'requires boolean')
            ival_ = self.gds_validate_boolean(ival_, node, 'send_signing_overrides')
            self.send_signing_overrides = ival_
# end class complex_remote_client_signer_attributes


class complex_remote_signer_attributes(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, allow_signing_overrides=None):
        self.allow_signing_overrides = allow_signing_overrides
    def factory(*args_, **kwargs_):
        if complex_remote_signer_attributes.subclass:
            return complex_remote_signer_attributes.subclass(*args_, **kwargs_)
        else:
            return complex_remote_signer_attributes(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_allow_signing_overrides(self): return self.allow_signing_overrides
    def set_allow_signing_overrides(self, allow_signing_overrides): self.allow_signing_overrides = allow_signing_overrides
    def export(self, outfile, level, namespace_='tns:', name_='complex_remote_signer_attributes', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='complex_remote_signer_attributes')
        if self.hasContent_():
            outfile.write('>\n')
            self.exportChildren(outfile, level + 1, namespace_, name_)
            showIndent(outfile, level)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='tns:', name_='complex_remote_signer_attributes'):
        pass
    def exportChildren(self, outfile, level, namespace_='tns:', name_='complex_remote_signer_attributes', fromsubclass_=False):
        if self.allow_signing_overrides is not None:
            showIndent(outfile, level)
            outfile.write('<%sallow_signing_overrides>%s</%sallow_signing_overrides>\n' % (namespace_, self.gds_format_boolean(self.gds_str_lower(str(self.allow_signing_overrides)), input_name='allow_signing_overrides'), namespace_))
    def hasContent_(self):
        if (
            self.allow_signing_overrides is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='complex_remote_signer_attributes'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.allow_signing_overrides is not None:
            showIndent(outfile, level)
            outfile.write('allow_signing_overrides=%s,\n' % self.allow_signing_overrides)
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'allow_signing_overrides':
            sval_ = child_.text
            if sval_ in ('true', '1'):
                ival_ = True
            elif sval_ in ('false', '0'):
                ival_ = False
            else:
                raise_parse_error(child_, 'requires boolean')
            ival_ = self.gds_validate_boolean(ival_, node, 'allow_signing_overrides')
            self.allow_signing_overrides = ival_
# end class complex_remote_signer_attributes


class complex_server(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, host=None, port=None, trust_keystore=None, trust_keystore_password=None, trust_keystore_type=None, host_validation_mode=None):
        self.host = host
        self.port = port
        self.trust_keystore = trust_keystore
        self.trust_keystore_password = trust_keystore_password
        self.trust_keystore_type = trust_keystore_type
        self.host_validation_mode = host_validation_mode
    def factory(*args_, **kwargs_):
        if complex_server.subclass:
            return complex_server.subclass(*args_, **kwargs_)
        else:
            return complex_server(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_host(self): return self.host
    def set_host(self, host): self.host = host
    def get_port(self): return self.port
    def set_port(self, port): self.port = port
    def get_trust_keystore(self): return self.trust_keystore
    def set_trust_keystore(self, trust_keystore): self.trust_keystore = trust_keystore
    def get_trust_keystore_password(self): return self.trust_keystore_password
    def set_trust_keystore_password(self, trust_keystore_password): self.trust_keystore_password = trust_keystore_password
    def get_trust_keystore_type(self): return self.trust_keystore_type
    def set_trust_keystore_type(self, trust_keystore_type): self.trust_keystore_type = trust_keystore_type
    def get_host_validation_mode(self): return self.host_validation_mode
    def set_host_validation_mode(self, host_validation_mode): self.host_validation_mode = host_validation_mode
    def export(self, outfile, level, namespace_='tns:', name_='complex_server', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='complex_server')
        if self.hasContent_():
            outfile.write('>\n')
            self.exportChildren(outfile, level + 1, namespace_, name_)
            showIndent(outfile, level)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='tns:', name_='complex_server'):
        pass
    def exportChildren(self, outfile, level, namespace_='tns:', name_='complex_server', fromsubclass_=False):
        if self.host is not None:
            showIndent(outfile, level)
            outfile.write('<%shost>%s</%shost>\n' % (namespace_, self.gds_format_string(quote_xml(self.host).encode(ExternalEncoding), input_name='host'), namespace_))
        if self.port is not None:
            showIndent(outfile, level)
            outfile.write('<%sport>%s</%sport>\n' % (namespace_, self.gds_format_integer(self.port, input_name='port'), namespace_))
        if self.trust_keystore is not None:
            showIndent(outfile, level)
            outfile.write('<%strust_keystore>%s</%strust_keystore>\n' % (namespace_, self.gds_format_string(quote_xml(self.trust_keystore).encode(ExternalEncoding), input_name='trust_keystore'), namespace_))
        if self.trust_keystore_password is not None:
            showIndent(outfile, level)
            outfile.write('<%strust_keystore_password>%s</%strust_keystore_password>\n' % (namespace_, self.gds_format_string(quote_xml(self.trust_keystore_password).encode(ExternalEncoding), input_name='trust_keystore_password'), namespace_))
        if self.trust_keystore_type is not None:
            showIndent(outfile, level)
            outfile.write('<%strust_keystore_type>%s</%strust_keystore_type>\n' % (namespace_, self.gds_format_string(quote_xml(self.trust_keystore_type).encode(ExternalEncoding), input_name='trust_keystore_type'), namespace_))
        if self.host_validation_mode is not None:
            showIndent(outfile, level)
            outfile.write('<%shost_validation_mode>%s</%shost_validation_mode>\n' % (namespace_, self.gds_format_string(quote_xml(self.host_validation_mode).encode(ExternalEncoding), input_name='host_validation_mode'), namespace_))
    def hasContent_(self):
        if (
            self.host is not None or
            self.port is not None or
            self.trust_keystore is not None or
            self.trust_keystore_password is not None or
            self.trust_keystore_type is not None or
            self.host_validation_mode is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='complex_server'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.host is not None:
            showIndent(outfile, level)
            outfile.write('host=%s,\n' % quote_python(self.host).encode(ExternalEncoding))
        if self.port is not None:
            showIndent(outfile, level)
            outfile.write('port=%d,\n' % self.port)
        if self.trust_keystore is not None:
            showIndent(outfile, level)
            outfile.write('trust_keystore=%s,\n' % quote_python(self.trust_keystore).encode(ExternalEncoding))
        if self.trust_keystore_password is not None:
            showIndent(outfile, level)
            outfile.write('trust_keystore_password=%s,\n' % quote_python(self.trust_keystore_password).encode(ExternalEncoding))
        if self.trust_keystore_type is not None:
            showIndent(outfile, level)
            outfile.write('trust_keystore_type=%s,\n' % quote_python(self.trust_keystore_type).encode(ExternalEncoding))
        if self.host_validation_mode is not None:
            showIndent(outfile, level)
            outfile.write('host_validation_mode=%s,\n' % quote_python(self.host_validation_mode).encode(ExternalEncoding))
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'host':
            host_ = child_.text
            host_ = self.gds_validate_string(host_, node, 'host')
            self.host = host_
        elif nodeName_ == 'port':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError), exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            ival_ = self.gds_validate_integer(ival_, node, 'port')
            self.port = ival_
        elif nodeName_ == 'trust_keystore':
            trust_keystore_ = child_.text
            trust_keystore_ = self.gds_validate_string(trust_keystore_, node, 'trust_keystore')
            self.trust_keystore = trust_keystore_
        elif nodeName_ == 'trust_keystore_password':
            trust_keystore_password_ = child_.text
            trust_keystore_password_ = self.gds_validate_string(trust_keystore_password_, node, 'trust_keystore_password')
            self.trust_keystore_password = trust_keystore_password_
        elif nodeName_ == 'trust_keystore_type':
            trust_keystore_type_ = child_.text
            trust_keystore_type_ = self.gds_validate_string(trust_keystore_type_, node, 'trust_keystore_type')
            self.trust_keystore_type = trust_keystore_type_
        elif nodeName_ == 'host_validation_mode':
            host_validation_mode_ = child_.text
            host_validation_mode_ = self.gds_validate_string(host_validation_mode_, node, 'host_validation_mode')
            self.host_validation_mode = host_validation_mode_
# end class complex_server


class trust_keystore_type(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, valueOf_=None):
        self.valueOf_ = valueOf_
    def factory(*args_, **kwargs_):
        if trust_keystore_type.subclass:
            return trust_keystore_type.subclass(*args_, **kwargs_)
        else:
            return trust_keystore_type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def export(self, outfile, level, namespace_='tns:', name_='trust_keystore_type', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='trust_keystore_type')
        if self.hasContent_():
            outfile.write('>\n')
            self.exportChildren(outfile, level + 1, namespace_, name_)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='tns:', name_='trust_keystore_type'):
        pass
    def exportChildren(self, outfile, level, namespace_='tns:', name_='trust_keystore_type', fromsubclass_=False):
        pass
    def hasContent_(self):
        if (

            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='trust_keystore_type'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        pass
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class trust_keystore_type


class host_validation_mode(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, valueOf_=None):
        self.valueOf_ = valueOf_
    def factory(*args_, **kwargs_):
        if host_validation_mode.subclass:
            return host_validation_mode.subclass(*args_, **kwargs_)
        else:
            return host_validation_mode(*args_, **kwargs_)
    factory = staticmethod(factory)
    def export(self, outfile, level, namespace_='tns:', name_='host_validation_mode', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='host_validation_mode')
        if self.hasContent_():
            outfile.write('>\n')
            self.exportChildren(outfile, level + 1, namespace_, name_)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='tns:', name_='host_validation_mode'):
        pass
    def exportChildren(self, outfile, level, namespace_='tns:', name_='host_validation_mode', fromsubclass_=False):
        pass
    def hasContent_(self):
        if (

            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='host_validation_mode'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        pass
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class host_validation_mode


class complex_user_identity(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, token_identity_slot=None, token_password=None, keystore_file=None, token_driver_home=None, keystore_type=None):
        self.token_identity_slot = token_identity_slot
        self.token_password = token_password
        self.keystore_file = keystore_file
        self.token_driver_home = token_driver_home
        self.keystore_type = keystore_type
    def factory(*args_, **kwargs_):
        if complex_user_identity.subclass:
            return complex_user_identity.subclass(*args_, **kwargs_)
        else:
            return complex_user_identity(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_token_identity_slot(self): return self.token_identity_slot
    def set_token_identity_slot(self, token_identity_slot): self.token_identity_slot = token_identity_slot
    def get_token_password(self): return self.token_password
    def set_token_password(self, token_password): self.token_password = token_password
    def get_keystore_file(self): return self.keystore_file
    def set_keystore_file(self, keystore_file): self.keystore_file = keystore_file
    def get_token_driver_home(self): return self.token_driver_home
    def set_token_driver_home(self, token_driver_home): self.token_driver_home = token_driver_home
    def get_keystore_type(self): return self.keystore_type
    def set_keystore_type(self, keystore_type): self.keystore_type = keystore_type
    def export(self, outfile, level, namespace_='tns:', name_='complex_user_identity', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='complex_user_identity')
        if self.hasContent_():
            outfile.write('>\n')
            self.exportChildren(outfile, level + 1, namespace_, name_)
            showIndent(outfile, level)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='tns:', name_='complex_user_identity'):
        pass
    def exportChildren(self, outfile, level, namespace_='tns:', name_='complex_user_identity', fromsubclass_=False):
        if self.token_identity_slot is not None:
            showIndent(outfile, level)
            outfile.write('<%stoken_identity_slot>%s</%stoken_identity_slot>\n' % (namespace_, self.gds_format_integer(self.token_identity_slot, input_name='token_identity_slot'), namespace_))
        if self.token_password is not None:
            showIndent(outfile, level)
            outfile.write('<%stoken_password>%s</%stoken_password>\n' % (namespace_, self.gds_format_string(quote_xml(self.token_password).encode(ExternalEncoding), input_name='token_password'), namespace_))
        if self.keystore_file is not None:
            showIndent(outfile, level)
            outfile.write('<%skeystore_file>%s</%skeystore_file>\n' % (namespace_, self.gds_format_string(quote_xml(self.keystore_file).encode(ExternalEncoding), input_name='keystore_file'), namespace_))
        if self.token_driver_home is not None:
            self.token_driver_home.export(outfile, level, namespace_, name_='token_driver_home', )
        if self.keystore_type is not None:
            showIndent(outfile, level)
            outfile.write('<%skeystore_type>%s</%skeystore_type>\n' % (namespace_, self.gds_format_string(quote_xml(self.keystore_type).encode(ExternalEncoding), input_name='keystore_type'), namespace_))
    def hasContent_(self):
        if (
            self.token_identity_slot is not None or
            self.token_password is not None or
            self.keystore_file is not None or
            self.token_driver_home is not None or
            self.keystore_type is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='complex_user_identity'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.token_identity_slot is not None:
            showIndent(outfile, level)
            outfile.write('token_identity_slot=%d,\n' % self.token_identity_slot)
        if self.token_password is not None:
            showIndent(outfile, level)
            outfile.write('token_password=%s,\n' % quote_python(self.token_password).encode(ExternalEncoding))
        if self.keystore_file is not None:
            showIndent(outfile, level)
            outfile.write('keystore_file=%s,\n' % quote_python(self.keystore_file).encode(ExternalEncoding))
        if self.token_driver_home is not None:
            showIndent(outfile, level)
            outfile.write('token_driver_home=model_.complex_token_driver_home(\n')
            self.token_driver_home.exportLiteral(outfile, level, name_='token_driver_home')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.keystore_type is not None:
            showIndent(outfile, level)
            outfile.write('keystore_type=%s,\n' % quote_python(self.keystore_type).encode(ExternalEncoding))
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'token_identity_slot':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError), exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            ival_ = self.gds_validate_integer(ival_, node, 'token_identity_slot')
            self.token_identity_slot = ival_
        elif nodeName_ == 'token_password':
            token_password_ = child_.text
            token_password_ = self.gds_validate_string(token_password_, node, 'token_password')
            self.token_password = token_password_
        elif nodeName_ == 'keystore_file':
            keystore_file_ = child_.text
            keystore_file_ = self.gds_validate_string(keystore_file_, node, 'keystore_file')
            self.keystore_file = keystore_file_
        elif nodeName_ == 'token_driver_home':
            obj_ = complex_token_driver_home.factory()
            obj_.build(child_)
            self.set_token_driver_home(obj_)
        elif nodeName_ == 'keystore_type':
            keystore_type_ = child_.text
            keystore_type_ = self.gds_validate_string(keystore_type_, node, 'keystore_type')
            self.keystore_type = keystore_type_
# end class complex_user_identity


class keystore_type(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, valueOf_=None):
        self.valueOf_ = valueOf_
    def factory(*args_, **kwargs_):
        if keystore_type.subclass:
            return keystore_type.subclass(*args_, **kwargs_)
        else:
            return keystore_type(*args_, **kwargs_)
    factory = staticmethod(factory)
    def export(self, outfile, level, namespace_='tns:', name_='keystore_type', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='keystore_type')
        if self.hasContent_():
            outfile.write('>\n')
            self.exportChildren(outfile, level + 1, namespace_, name_)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='tns:', name_='keystore_type'):
        pass
    def exportChildren(self, outfile, level, namespace_='tns:', name_='keystore_type', fromsubclass_=False):
        pass
    def hasContent_(self):
        if (

            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='keystore_type'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        pass
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        pass
# end class keystore_type


class complex_token_driver_home(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, windows=None, linux=None):
        self.windows = windows
        self.linux = linux
    def factory(*args_, **kwargs_):
        if complex_token_driver_home.subclass:
            return complex_token_driver_home.subclass(*args_, **kwargs_)
        else:
            return complex_token_driver_home(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_windows(self): return self.windows
    def set_windows(self, windows): self.windows = windows
    def get_linux(self): return self.linux
    def set_linux(self, linux): self.linux = linux
    def export(self, outfile, level, namespace_='tns:', name_='complex_token_driver_home', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='complex_token_driver_home')
        if self.hasContent_():
            outfile.write('>\n')
            self.exportChildren(outfile, level + 1, namespace_, name_)
            showIndent(outfile, level)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='tns:', name_='complex_token_driver_home'):
        pass
    def exportChildren(self, outfile, level, namespace_='tns:', name_='complex_token_driver_home', fromsubclass_=False):
        if self.windows is not None:
            showIndent(outfile, level)
            outfile.write('<%swindows>%s</%swindows>\n' % (namespace_, self.gds_format_string(quote_xml(self.windows).encode(ExternalEncoding), input_name='windows'), namespace_))
        if self.linux is not None:
            showIndent(outfile, level)
            outfile.write('<%slinux>%s</%slinux>\n' % (namespace_, self.gds_format_string(quote_xml(self.linux).encode(ExternalEncoding), input_name='linux'), namespace_))
    def hasContent_(self):
        if (
            self.windows is not None or
            self.linux is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='complex_token_driver_home'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.windows is not None:
            showIndent(outfile, level)
            outfile.write('windows=%s,\n' % quote_python(self.windows).encode(ExternalEncoding))
        if self.linux is not None:
            showIndent(outfile, level)
            outfile.write('linux=%s,\n' % quote_python(self.linux).encode(ExternalEncoding))
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'windows':
            windows_ = child_.text
            windows_ = self.gds_validate_string(windows_, node, 'windows')
            self.windows = windows_
        elif nodeName_ == 'linux':
            linux_ = child_.text
            linux_ = self.gds_validate_string(linux_, node, 'linux')
            self.linux = linux_
# end class complex_token_driver_home


class complex_post_process(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, pil_splitter=None):
        self.pil_splitter = pil_splitter
    def factory(*args_, **kwargs_):
        if complex_post_process.subclass:
            return complex_post_process.subclass(*args_, **kwargs_)
        else:
            return complex_post_process(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_pil_splitter(self): return self.pil_splitter
    def set_pil_splitter(self, pil_splitter): self.pil_splitter = pil_splitter
    def export(self, outfile, level, namespace_='tns:', name_='complex_post_process', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='complex_post_process')
        if self.hasContent_():
            outfile.write('>\n')
            self.exportChildren(outfile, level + 1, namespace_, name_)
            showIndent(outfile, level)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='tns:', name_='complex_post_process'):
        pass
    def exportChildren(self, outfile, level, namespace_='tns:', name_='complex_post_process', fromsubclass_=False):
        if self.pil_splitter is not None:
            showIndent(outfile, level)
            outfile.write('<%spil_splitter>%s</%spil_splitter>\n' % (namespace_, self.gds_format_string(quote_xml(self.pil_splitter).encode(ExternalEncoding), input_name='pil_splitter'), namespace_))
    def hasContent_(self):
        if (
            self.pil_splitter is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='complex_post_process'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.pil_splitter is not None:
            showIndent(outfile, level)
            outfile.write('pil_splitter=%s,\n' % quote_python(self.pil_splitter).encode(ExternalEncoding))
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'pil_splitter':
            pil_splitter_ = child_.text
            pil_splitter_ = self.gds_validate_string(pil_splitter_, node, 'pil_splitter')
            self.pil_splitter = pil_splitter_
# end class complex_post_process


class complex_data_provisioning(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, base_path=None):
        self.base_path = base_path
    def factory(*args_, **kwargs_):
        if complex_data_provisioning.subclass:
            return complex_data_provisioning.subclass(*args_, **kwargs_)
        else:
            return complex_data_provisioning(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_base_path(self): return self.base_path
    def set_base_path(self, base_path): self.base_path = base_path
    def export(self, outfile, level, namespace_='tns:', name_='complex_data_provisioning', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='complex_data_provisioning')
        if self.hasContent_():
            outfile.write('>\n')
            self.exportChildren(outfile, level + 1, namespace_, name_)
            showIndent(outfile, level)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='tns:', name_='complex_data_provisioning'):
        pass
    def exportChildren(self, outfile, level, namespace_='tns:', name_='complex_data_provisioning', fromsubclass_=False):
        if self.base_path is not None:
            showIndent(outfile, level)
            outfile.write('<%sbase_path>%s</%sbase_path>\n' % (namespace_, self.gds_format_string(quote_xml(self.base_path).encode(ExternalEncoding), input_name='base_path'), namespace_))
    def hasContent_(self):
        if (
            self.base_path is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='complex_data_provisioning'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.base_path is not None:
            showIndent(outfile, level)
            outfile.write('base_path=%s,\n' % quote_python(self.base_path).encode(ExternalEncoding))
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'base_path':
            base_path_ = child_.text
            base_path_ = self.gds_validate_string(base_path_, node, 'base_path')
            self.base_path = base_path_
# end class complex_data_provisioning


class complex_images_list(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, image=None):
        if image is None:
            self.image = []
        else:
            self.image = image
    def factory(*args_, **kwargs_):
        if complex_images_list.subclass:
            return complex_images_list.subclass(*args_, **kwargs_)
        else:
            return complex_images_list(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_image(self): return self.image
    def set_image(self, image): self.image = image
    def add_image(self, value): self.image.append(value)
    def insert_image(self, index, value): self.image[index] = value
    def export(self, outfile, level, namespace_='tns:', name_='complex_images_list', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='complex_images_list')
        if self.hasContent_():
            outfile.write('>\n')
            self.exportChildren(outfile, level + 1, namespace_, name_)
            showIndent(outfile, level)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='tns:', name_='complex_images_list'):
        pass
    def exportChildren(self, outfile, level, namespace_='tns:', name_='complex_images_list', fromsubclass_=False):
        for image_ in self.image:
            image_.export(outfile, level, namespace_, name_='image')
    def hasContent_(self):
        if (
            self.image
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='complex_images_list'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        showIndent(outfile, level)
        outfile.write('image=[\n')
        level += 1
        for image_ in self.image:
            showIndent(outfile, level)
            outfile.write('model_.complex_image(\n')
            image_.exportLiteral(outfile, level, name_='complex_image')
            showIndent(outfile, level)
            outfile.write('),\n')
        level -= 1
        showIndent(outfile, level)
        outfile.write('],\n')
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'image':
            obj_ = complex_image.factory()
            obj_.build(child_)
            self.image.append(obj_)
# end class complex_images_list


class complex_image(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, image_type=None, sign_id=None, output_file_name=None, cert_config=None, name=None, pil_split=None, general_properties_overrides=None, meta_build_location=None, post_process_commands=None):
        self.image_type = _cast(None, image_type)
        self.sign_id = _cast(None, sign_id)
        self.output_file_name = _cast(None, output_file_name)
        self.cert_config = _cast(None, cert_config)
        self.name = _cast(None, name)
        self.pil_split = pil_split
        self.general_properties_overrides = general_properties_overrides
        self.meta_build_location = meta_build_location
        self.post_process_commands = post_process_commands
    def factory(*args_, **kwargs_):
        if complex_image.subclass:
            return complex_image.subclass(*args_, **kwargs_)
        else:
            return complex_image(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_pil_split(self): return self.pil_split
    def set_pil_split(self, pil_split): self.pil_split = pil_split
    def get_general_properties_overrides(self): return self.general_properties_overrides
    def set_general_properties_overrides(self, general_properties_overrides): self.general_properties_overrides = general_properties_overrides
    def get_meta_build_location(self): return self.meta_build_location
    def set_meta_build_location(self, meta_build_location): self.meta_build_location = meta_build_location
    def get_post_process_commands(self): return self.post_process_commands
    def set_post_process_commands(self, post_process_commands): self.post_process_commands = post_process_commands
    def get_image_type(self): return self.image_type
    def set_image_type(self, image_type): self.image_type = image_type
    def get_sign_id(self): return self.sign_id
    def set_sign_id(self, sign_id): self.sign_id = sign_id
    def get_output_file_name(self): return self.output_file_name
    def set_output_file_name(self, output_file_name): self.output_file_name = output_file_name
    def get_cert_config(self): return self.cert_config
    def set_cert_config(self, cert_config): self.cert_config = cert_config
    def get_name(self): return self.name
    def set_name(self, name): self.name = name
    def export(self, outfile, level, namespace_='tns:', name_='complex_image', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='complex_image')
        if self.hasContent_():
            outfile.write('>\n')
            self.exportChildren(outfile, level + 1, namespace_, name_)
            showIndent(outfile, level)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='tns:', name_='complex_image'):
        if self.image_type is not None and 'image_type' not in already_processed:
            already_processed.append('image_type')
            outfile.write(' image_type=%s' % (self.gds_format_string(quote_attrib(self.image_type).encode(ExternalEncoding), input_name='image_type'), ))
        if self.sign_id is not None and 'sign_id' not in already_processed:
            already_processed.append('sign_id')
            outfile.write(' sign_id=%s' % (self.gds_format_string(quote_attrib(self.sign_id).encode(ExternalEncoding), input_name='sign_id'), ))
        if self.output_file_name is not None and 'output_file_name' not in already_processed:
            already_processed.append('output_file_name')
            outfile.write(' output_file_name=%s' % (self.gds_format_string(quote_attrib(self.output_file_name).encode(ExternalEncoding), input_name='output_file_name'), ))
        if self.cert_config is not None and 'cert_config' not in already_processed:
            already_processed.append('cert_config')
            outfile.write(' cert_config=%s' % (self.gds_format_string(quote_attrib(self.cert_config).encode(ExternalEncoding), input_name='cert_config'), ))
        if self.name is not None and 'name' not in already_processed:
            already_processed.append('name')
            outfile.write(' name=%s' % (self.gds_format_string(quote_attrib(self.name).encode(ExternalEncoding), input_name='name'), ))
    def exportChildren(self, outfile, level, namespace_='tns:', name_='complex_image', fromsubclass_=False):
        if self.pil_split is not None:
            showIndent(outfile, level)
            outfile.write('<%spil_split>%s</%spil_split>\n' % (namespace_, self.gds_format_boolean(self.gds_str_lower(str(self.pil_split)), input_name='pil_split'), namespace_))
        if self.general_properties_overrides is not None:
            self.general_properties_overrides.export(outfile, level, namespace_, name_='general_properties_overrides', )
        if self.meta_build_location is not None:
            showIndent(outfile, level)
            outfile.write('<%smeta_build_location>%s</%smeta_build_location>\n' % (namespace_, self.gds_format_string(quote_xml(self.meta_build_location).encode(ExternalEncoding), input_name='meta_build_location'), namespace_))
        if self.post_process_commands is not None:
            showIndent(outfile, level)
            outfile.write('<%spost_process_commands>%s</%spost_process_commands>\n' % (namespace_, self.gds_format_string(quote_xml(self.post_process_commands).encode(ExternalEncoding), input_name='post_process_commands'), namespace_))
    def hasContent_(self):
        if (
            self.pil_split is not None or
            self.general_properties_overrides is not None or
            self.meta_build_location is not None or
            self.post_process_commands is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='complex_image'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        if self.image_type is not None and 'image_type' not in already_processed:
            already_processed.append('image_type')
            showIndent(outfile, level)
            outfile.write('image_type = "%s",\n' % (self.image_type,))
        if self.sign_id is not None and 'sign_id' not in already_processed:
            already_processed.append('sign_id')
            showIndent(outfile, level)
            outfile.write('sign_id = "%s",\n' % (self.sign_id,))
        if self.output_file_name is not None and 'output_file_name' not in already_processed:
            already_processed.append('output_file_name')
            showIndent(outfile, level)
            outfile.write('output_file_name = "%s",\n' % (self.output_file_name,))
        if self.cert_config is not None and 'cert_config' not in already_processed:
            already_processed.append('cert_config')
            showIndent(outfile, level)
            outfile.write('cert_config = "%s",\n' % (self.cert_config,))
        if self.name is not None and 'name' not in already_processed:
            already_processed.append('name')
            showIndent(outfile, level)
            outfile.write('name = "%s",\n' % (self.name,))
    def exportLiteralChildren(self, outfile, level, name_):
        if self.pil_split is not None:
            showIndent(outfile, level)
            outfile.write('pil_split=%s,\n' % self.pil_split)
        if self.general_properties_overrides is not None:
            showIndent(outfile, level)
            outfile.write('general_properties_overrides=model_.complex_general_properties_overrides(\n')
            self.general_properties_overrides.exportLiteral(outfile, level, name_='general_properties_overrides')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.meta_build_location is not None:
            showIndent(outfile, level)
            outfile.write('meta_build_location=%s,\n' % quote_python(self.meta_build_location).encode(ExternalEncoding))
        if self.post_process_commands is not None:
            showIndent(outfile, level)
            outfile.write('post_process_commands=%s,\n' % quote_python(self.post_process_commands).encode(ExternalEncoding))
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('image_type', node)
        if value is not None and 'image_type' not in already_processed:
            already_processed.append('image_type')
            self.image_type = value
        value = find_attr_value_('sign_id', node)
        if value is not None and 'sign_id' not in already_processed:
            already_processed.append('sign_id')
            self.sign_id = value
        value = find_attr_value_('output_file_name', node)
        if value is not None and 'output_file_name' not in already_processed:
            already_processed.append('output_file_name')
            self.output_file_name = value
        value = find_attr_value_('cert_config', node)
        if value is not None and 'cert_config' not in already_processed:
            already_processed.append('cert_config')
            self.cert_config = value
        value = find_attr_value_('name', node)
        if value is not None and 'name' not in already_processed:
            already_processed.append('name')
            self.name = value
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'pil_split':
            sval_ = child_.text
            if sval_ in ('true', '1'):
                ival_ = True
            elif sval_ in ('false', '0'):
                ival_ = False
            else:
                raise_parse_error(child_, 'requires boolean')
            ival_ = self.gds_validate_boolean(ival_, node, 'pil_split')
            self.pil_split = ival_
        elif nodeName_ == 'general_properties_overrides':
            obj_ = complex_general_properties_overrides.factory()
            obj_.build(child_)
            self.set_general_properties_overrides(obj_)
        elif nodeName_ == 'meta_build_location':
            meta_build_location_ = child_.text
            meta_build_location_ = self.gds_validate_string(meta_build_location_, node, 'meta_build_location')
            self.meta_build_location = meta_build_location_
        elif nodeName_ == 'post_process_commands':
            post_process_commands_ = child_.text
            post_process_commands_ = self.gds_validate_string(post_process_commands_, node, 'post_process_commands')
            self.post_process_commands = post_process_commands_
# end class complex_image


class complex_general_properties_overrides(GeneratedsSuper):
    subclass = None
    superclass = None
    def __init__(self, selected_encryptor=None, max_cert_size=None, key_size=None, num_certs_in_certchain=None, num_root_certs=None, max_num_root_certs=None, testsig_serialnum=None, mrc_index=None, msm_part=None, oem_id=None, model_id=None, sw_id=None, anti_rollback_version=None, app_id=None, crash_dump=None, rot_en=None, soc_hw_version=None, soc_vers=None, mask_soc_hw_version=None, in_use_soc_hw_version=None, use_serial_number_in_signing=None, serial_number=None, debug=None, multi_serial_numbers=None, exponent=None, object_id=None, cass_capability=None, hash_pageseg_as_segment=None, hash_algorithm=None, segment_hash_algorithm=None, cass_attest_cert=None, rsa_padding=None, hmac=None, secboot_version=None, qti_sign=None, oem_sign=None, UIE_key=None, UIE_capability=None, UIE_server_cert_path=None, UIE_server_url=None, UIE_root_key_type=None, uie_key_switch_enable=None, oem_id_independent=None, revocation_enablement=None, activation_enablement=None, root_revoke_activate_enable=None, dsa_type=None, ecdsa_curve=None, multi_image_segment_addr=None, client_id=None, lib_id=None, image_entry=None):
        self.selected_encryptor = selected_encryptor
        self.max_cert_size = max_cert_size
        self.key_size = key_size
        self.num_certs_in_certchain = num_certs_in_certchain
        self.num_root_certs = num_root_certs
        self.max_num_root_certs = max_num_root_certs
        self.testsig_serialnum = testsig_serialnum
        self.mrc_index = mrc_index
        self.msm_part = msm_part
        self.oem_id = oem_id
        self.model_id = model_id
        self.sw_id = sw_id
        self.anti_rollback_version = anti_rollback_version
        self.app_id = app_id
        self.crash_dump = crash_dump
        self.rot_en = rot_en
        self.soc_hw_version = soc_hw_version
        self.soc_vers = soc_vers
        self.mask_soc_hw_version = mask_soc_hw_version
        self.in_use_soc_hw_version = in_use_soc_hw_version
        self.use_serial_number_in_signing = use_serial_number_in_signing
        self.serial_number = serial_number
        self.debug = debug
        self.multi_serial_numbers = multi_serial_numbers
        self.exponent = exponent
        self.object_id = object_id
        self.cass_capability = cass_capability
        self.hash_pageseg_as_segment = hash_pageseg_as_segment
        self.hash_algorithm = hash_algorithm
        self.segment_hash_algorithm = segment_hash_algorithm
        self.cass_attest_cert = cass_attest_cert
        self.rsa_padding = rsa_padding
        self.hmac = hmac
        self.secboot_version = secboot_version
        self.qti_sign = qti_sign
        self.oem_sign = oem_sign
        self.UIE_key = UIE_key
        self.UIE_capability = UIE_capability
        self.UIE_server_cert_path = UIE_server_cert_path
        self.UIE_server_url = UIE_server_url
        self.UIE_root_key_type = UIE_root_key_type
        self.uie_key_switch_enable = uie_key_switch_enable
        self.oem_id_independent = oem_id_independent
        self.revocation_enablement = revocation_enablement
        self.activation_enablement = activation_enablement
        self.root_revoke_activate_enable = root_revoke_activate_enable
        self.dsa_type = dsa_type
        self.ecdsa_curve = ecdsa_curve
        self.multi_image_segment_addr = multi_image_segment_addr
        self.client_id = client_id
        self.lib_id = lib_id
        self.image_entry = image_entry
    def factory(*args_, **kwargs_):
        if complex_general_properties_overrides.subclass:
            return complex_general_properties_overrides.subclass(*args_, **kwargs_)
        else:
            return complex_general_properties_overrides(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_selected_encryptor(self): return self.selected_encryptor
    def set_selected_encryptor(self, selected_encryptor): self.selected_encryptor = selected_encryptor
    def get_max_cert_size(self): return self.max_cert_size
    def set_max_cert_size(self, max_cert_size): self.max_cert_size = max_cert_size
    def get_key_size(self): return self.key_size
    def set_key_size(self, key_size): self.key_size = key_size
    def get_num_certs_in_certchain(self): return self.num_certs_in_certchain
    def set_num_certs_in_certchain(self, num_certs_in_certchain): self.num_certs_in_certchain = num_certs_in_certchain
    def get_num_root_certs(self): return self.num_root_certs
    def set_num_root_certs(self, num_root_certs): self.num_root_certs = num_root_certs
    def get_max_num_root_certs(self): return self.max_num_root_certs
    def set_max_num_root_certs(self, max_num_root_certs): self.max_num_root_certs = max_num_root_certs
    def get_testsig_serialnum(self): return self.testsig_serialnum
    def set_testsig_serialnum(self, testsig_serialnum): self.testsig_serialnum = testsig_serialnum
    def get_mrc_index(self): return self.mrc_index
    def set_mrc_index(self, mrc_index): self.mrc_index = mrc_index
    def get_msm_part(self): return self.msm_part
    def set_msm_part(self, msm_part): self.msm_part = msm_part
    def get_oem_id(self): return self.oem_id
    def set_oem_id(self, oem_id): self.oem_id = oem_id
    def get_model_id(self): return self.model_id
    def set_model_id(self, model_id): self.model_id = model_id
    def get_sw_id(self): return self.sw_id
    def set_sw_id(self, sw_id): self.sw_id = sw_id
    def get_anti_rollback_version(self): return self.anti_rollback_version
    def set_anti_rollback_version(self, anti_rollback_version): self.anti_rollback_version = anti_rollback_version
    def get_app_id(self): return self.app_id
    def set_app_id(self, app_id): self.app_id = app_id
    def get_crash_dump(self): return self.crash_dump
    def set_crash_dump(self, crash_dump): self.crash_dump = crash_dump
    def get_rot_en(self): return self.rot_en
    def set_rot_en(self, rot_en): self.rot_en = rot_en
    def get_soc_hw_version(self): return self.soc_hw_version
    def set_soc_hw_version(self, soc_hw_version): self.soc_hw_version = soc_hw_version
    def get_soc_vers(self): return self.soc_vers
    def set_soc_vers(self, soc_vers): self.soc_vers = soc_vers
    def get_mask_soc_hw_version(self): return self.mask_soc_hw_version
    def set_mask_soc_hw_version(self, mask_soc_hw_version): self.mask_soc_hw_version = mask_soc_hw_version
    def get_in_use_soc_hw_version(self): return self.in_use_soc_hw_version
    def set_in_use_soc_hw_version(self, in_use_soc_hw_version): self.in_use_soc_hw_version = in_use_soc_hw_version
    def get_use_serial_number_in_signing(self): return self.use_serial_number_in_signing
    def set_use_serial_number_in_signing(self, use_serial_number_in_signing): self.use_serial_number_in_signing = use_serial_number_in_signing
    def get_serial_number(self): return self.serial_number
    def set_serial_number(self, serial_number): self.serial_number = serial_number
    def get_debug(self): return self.debug
    def set_debug(self, debug): self.debug = debug
    def get_multi_serial_numbers(self): return self.multi_serial_numbers
    def set_multi_serial_numbers(self, multi_serial_numbers): self.multi_serial_numbers = multi_serial_numbers
    def get_exponent(self): return self.exponent
    def set_exponent(self, exponent): self.exponent = exponent
    def get_object_id(self): return self.object_id
    def set_object_id(self, object_id): self.object_id = object_id
    def get_cass_capability(self): return self.cass_capability
    def set_cass_capability(self, cass_capability): self.cass_capability = cass_capability
    def get_hash_pageseg_as_segment(self): return self.hash_pageseg_as_segment
    def set_hash_pageseg_as_segment(self, hash_pageseg_as_segment): self.hash_pageseg_as_segment = hash_pageseg_as_segment
    def get_hash_algorithm(self): return self.hash_algorithm
    def set_hash_algorithm(self, hash_algorithm): self.hash_algorithm = hash_algorithm
    def get_segment_hash_algorithm(self): return self.segment_hash_algorithm
    def set_segment_hash_algorithm(self, segment_hash_algorithm): self.segment_hash_algorithm = segment_hash_algorithm
    def get_cass_attest_cert(self): return self.cass_attest_cert
    def set_cass_attest_cert(self, cass_attest_cert): self.cass_attest_cert = cass_attest_cert
    def get_rsa_padding(self): return self.rsa_padding
    def set_rsa_padding(self, rsa_padding): self.rsa_padding = rsa_padding
    def get_hmac(self): return self.hmac
    def set_hmac(self, hmac): self.hmac = hmac
    def get_secboot_version(self): return self.secboot_version
    def set_secboot_version(self, secboot_version): self.secboot_version = secboot_version
    def get_qti_sign(self): return self.qti_sign
    def set_qti_sign(self, qti_sign): self.qti_sign = qti_sign
    def get_oem_sign(self): return self.oem_sign
    def set_oem_sign(self, oem_sign): self.oem_sign = oem_sign
    def get_UIE_key(self): return self.UIE_key
    def set_UIE_key(self, UIE_key): self.UIE_key = UIE_key
    def get_UIE_capability(self): return self.UIE_capability
    def set_UIE_capability(self, UIE_capability): self.UIE_capability = UIE_capability
    def get_UIE_server_cert_path(self): return self.UIE_server_cert_path
    def set_UIE_server_cert_path(self, UIE_server_cert_path): self.UIE_server_cert_path = UIE_server_cert_path
    def get_UIE_server_url(self): return self.UIE_server_url
    def set_UIE_server_url(self, UIE_server_url): self.UIE_server_url = UIE_server_url
    def get_UIE_root_key_type(self): return self.UIE_root_key_type
    def set_UIE_root_key_type(self, UIE_root_key_type): self.UIE_root_key_type = UIE_root_key_type
    def get_uie_key_switch_enable(self): return self.uie_key_switch_enable
    def set_uie_key_switch_enable(self, uie_key_switch_enable): self.uie_key_switch_enable = uie_key_switch_enable
    def get_oem_id_independent(self): return self.oem_id_independent
    def set_oem_id_independent(self, oem_id_independent): self.oem_id_independent = oem_id_independent
    def get_revocation_enablement(self): return self.revocation_enablement
    def set_revocation_enablement(self, revocation_enablement): self.revocation_enablement = revocation_enablement
    def get_activation_enablement(self): return self.activation_enablement
    def set_activation_enablement(self, activation_enablement): self.activation_enablement = activation_enablement
    def get_root_revoke_activate_enable(self): return self.root_revoke_activate_enable
    def set_root_revoke_activate_enable(self, root_revoke_activate_enable): self.root_revoke_activate_enable = root_revoke_activate_enable
    def get_dsa_type(self): return self.dsa_type
    def set_dsa_type(self, dsa_type): self.dsa_type = dsa_type
    def get_ecdsa_curve(self): return self.ecdsa_curve
    def set_ecdsa_curve(self, ecdsa_curve): self.ecdsa_curve = ecdsa_curve
    def get_multi_image_segment_addr(self): return self.multi_image_segment_addr
    def set_multi_image_segment_addr(self, multi_image_segment_addr): self.multi_image_segment_addr = multi_image_segment_addr
    def get_client_id(self): return self.client_id
    def set_client_id(self, client_id): self.client_id = client_id
    def get_lib_id(self): return self.lib_id
    def set_lib_id(self, lib_id): self.lib_id = lib_id
    def get_image_entry(self): return self.image_entry
    def set_image_entry(self, image_entry): self.image_entry = image_entry
    def export(self, outfile, level, namespace_='tns:', name_='complex_general_properties_overrides', namespacedef_=''):
        showIndent(outfile, level)
        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = []
        self.exportAttributes(outfile, level, already_processed, namespace_, name_='complex_general_properties_overrides')
        if self.hasContent_():
            outfile.write('>\n')
            self.exportChildren(outfile, level + 1, namespace_, name_)
            showIndent(outfile, level)
            outfile.write('</%s%s>\n' % (namespace_, name_))
        else:
            outfile.write('/>\n')
    def exportAttributes(self, outfile, level, already_processed, namespace_='tns:', name_='complex_general_properties_overrides'):
        pass
    def exportChildren(self, outfile, level, namespace_='tns:', name_='complex_general_properties_overrides', fromsubclass_=False):
        if self.selected_encryptor is not None:
            showIndent(outfile, level)
            outfile.write('<%sselected_encryptor>%s</%sselected_encryptor>\n' % (namespace_, self.gds_format_string(quote_xml(self.selected_encryptor).encode(ExternalEncoding), input_name='selected_encryptor'), namespace_))
        if self.max_cert_size is not None:
            showIndent(outfile, level)
            outfile.write('<%smax_cert_size>%s</%smax_cert_size>\n' % (namespace_, self.gds_format_integer(self.max_cert_size, input_name='max_cert_size'), namespace_))
        if self.key_size is not None:
            showIndent(outfile, level)
            outfile.write('<%skey_size>%s</%skey_size>\n' % (namespace_, self.gds_format_integer(self.key_size, input_name='key_size'), namespace_))
        if self.num_certs_in_certchain is not None:
            showIndent(outfile, level)
            outfile.write('<%snum_certs_in_certchain>%s</%snum_certs_in_certchain>\n' % (namespace_, self.gds_format_integer(self.num_certs_in_certchain, input_name='num_certs_in_certchain'), namespace_))
        if self.num_root_certs is not None:
            showIndent(outfile, level)
            outfile.write('<%snum_root_certs>%s</%snum_root_certs>\n' % (namespace_, self.gds_format_integer(self.num_root_certs, input_name='num_root_certs'), namespace_))
        if self.max_num_root_certs is not None:
            showIndent(outfile, level)
            outfile.write('<%smax_num_root_certs>%s</%smax_num_root_certs>\n' % (namespace_, self.gds_format_integer(self.max_num_root_certs, input_name='max_num_root_certs'), namespace_))
        if self.testsig_serialnum is not None:
            showIndent(outfile, level)
            outfile.write('<%stestsig_serialnum>%s</%stestsig_serialnum>\n' % (namespace_, self.gds_format_string(quote_xml(self.testsig_serialnum).encode(ExternalEncoding), input_name='testsig_serialnum'), namespace_))
        if self.mrc_index is not None:
            showIndent(outfile, level)
            outfile.write('<%smrc_index>%s</%smrc_index>\n' % (namespace_, self.gds_format_integer(self.mrc_index, input_name='mrc_index'), namespace_))
        if self.msm_part is not None:
            showIndent(outfile, level)
            outfile.write('<%smsm_part>%s</%smsm_part>\n' % (namespace_, self.gds_format_string(quote_xml(self.msm_part).encode(ExternalEncoding), input_name='msm_part'), namespace_))
        if self.oem_id is not None:
            showIndent(outfile, level)
            outfile.write('<%soem_id>%s</%soem_id>\n' % (namespace_, self.gds_format_string(quote_xml(self.oem_id).encode(ExternalEncoding), input_name='oem_id'), namespace_))
        if self.model_id is not None:
            showIndent(outfile, level)
            outfile.write('<%smodel_id>%s</%smodel_id>\n' % (namespace_, self.gds_format_string(quote_xml(self.model_id).encode(ExternalEncoding), input_name='model_id'), namespace_))
        if self.sw_id is not None:
            showIndent(outfile, level)
            outfile.write('<%ssw_id>%s</%ssw_id>\n' % (namespace_, self.gds_format_string(quote_xml(self.sw_id).encode(ExternalEncoding), input_name='sw_id'), namespace_))
        if self.anti_rollback_version is not None:
            showIndent(outfile, level)
            outfile.write('<%santi_rollback_version>%s</%santi_rollback_version>\n' % (namespace_, self.gds_format_string(quote_xml(self.anti_rollback_version).encode(ExternalEncoding), input_name='anti_rollback_version'), namespace_))
        if self.app_id is not None:
            showIndent(outfile, level)
            outfile.write('<%sapp_id>%s</%sapp_id>\n' % (namespace_, self.gds_format_string(quote_xml(self.app_id).encode(ExternalEncoding), input_name='app_id'), namespace_))
        if self.crash_dump is not None:
            showIndent(outfile, level)
            outfile.write('<%scrash_dump>%s</%scrash_dump>\n' % (namespace_, self.gds_format_string(quote_xml(self.crash_dump).encode(ExternalEncoding), input_name='crash_dump'), namespace_))
        if self.rot_en is not None:
            showIndent(outfile, level)
            outfile.write('<%srot_en>%s</%srot_en>\n' % (namespace_, self.gds_format_string(quote_xml(self.rot_en).encode(ExternalEncoding), input_name='rot_en'), namespace_))
        if self.soc_hw_version is not None:
            showIndent(outfile, level)
            outfile.write('<%ssoc_hw_version>%s</%ssoc_hw_version>\n' % (namespace_, self.gds_format_string(quote_xml(self.soc_hw_version).encode(ExternalEncoding), input_name='soc_hw_version'), namespace_))
        if self.soc_vers is not None:
            showIndent(outfile, level)
            outfile.write('<%ssoc_vers>%s</%ssoc_vers>\n' % (namespace_, self.gds_format_string(quote_xml(self.soc_vers).encode(ExternalEncoding), input_name='soc_vers'), namespace_))
        if self.mask_soc_hw_version is not None:
            showIndent(outfile, level)
            outfile.write('<%smask_soc_hw_version>%s</%smask_soc_hw_version>\n' % (namespace_, self.gds_format_string(quote_xml(self.mask_soc_hw_version).encode(ExternalEncoding), input_name='mask_soc_hw_version'), namespace_))
        if self.in_use_soc_hw_version is not None:
            showIndent(outfile, level)
            outfile.write('<%sin_use_soc_hw_version>%s</%sin_use_soc_hw_version>\n' % (namespace_, self.gds_format_integer(self.in_use_soc_hw_version, input_name='in_use_soc_hw_version'), namespace_))
        if self.use_serial_number_in_signing is not None:
            showIndent(outfile, level)
            outfile.write('<%suse_serial_number_in_signing>%s</%suse_serial_number_in_signing>\n' % (namespace_, self.gds_format_integer(self.use_serial_number_in_signing, input_name='use_serial_number_in_signing'), namespace_))
        if self.serial_number is not None:
            showIndent(outfile, level)
            outfile.write('<%sserial_number>%s</%sserial_number>\n' % (namespace_, self.gds_format_string(quote_xml(self.serial_number).encode(ExternalEncoding), input_name='serial_number'), namespace_))
        if self.debug is not None:
            showIndent(outfile, level)
            outfile.write('<%sdebug>%s</%sdebug>\n' % (namespace_, self.gds_format_string(quote_xml(self.debug).encode(ExternalEncoding), input_name='debug'), namespace_))
        if self.multi_serial_numbers is not None:
            self.multi_serial_numbers.export(outfile, level, namespace_, name_='multi_serial_numbers')
        if self.exponent is not None:
            showIndent(outfile, level)
            outfile.write('<%sexponent>%s</%sexponent>\n' % (namespace_, self.gds_format_integer(self.exponent, input_name='exponent'), namespace_))
        if self.object_id is not None:
            self.object_id.export(outfile, level, namespace_, name_='object_id')
        if self.cass_capability is not None:
            showIndent(outfile, level)
            outfile.write('<%scass_capability>%s</%scass_capability>\n' % (namespace_, self.gds_format_string(quote_xml(self.cass_capability).encode(ExternalEncoding), input_name='cass_capability'), namespace_))
        if self.hash_pageseg_as_segment is not None:
            showIndent(outfile, level)
            outfile.write('<%shash_pageseg_as_segment>%s</%shash_pageseg_as_segment>\n' % (namespace_, self.gds_format_boolean(self.gds_str_lower(str(self.hash_pageseg_as_segment)), input_name='hash_pageseg_as_segment'), namespace_))
        if self.hash_algorithm is not None:
            showIndent(outfile, level)
            outfile.write('<%shash_algorithm>%s</%shash_algorithm>\n' % (namespace_, self.gds_format_string(quote_xml(self.hash_algorithm).encode(ExternalEncoding), input_name='hash_algorithm'), namespace_))
        if self.segment_hash_algorithm is not None:
            showIndent(outfile, level)
            outfile.write('<%ssegment_hash_algorithm>%s</%ssegment_hash_algorithm>\n' % (namespace_, self.gds_format_string(quote_xml(self.segment_hash_algorithm).encode(ExternalEncoding), input_name='segment_hash_algorithm'), namespace_))
        if self.cass_attest_cert is not None:
            showIndent(outfile, level)
            outfile.write('<%scass_attest_cert>%s</%scass_attest_cert>\n' % (namespace_, self.gds_format_string(quote_xml(self.cass_attest_cert).encode(ExternalEncoding), input_name='cass_attest_cert'), namespace_))
        if self.rsa_padding is not None:
            showIndent(outfile, level)
            outfile.write('<%srsa_padding>%s</%srsa_padding>\n' % (namespace_, self.gds_format_string(quote_xml(self.rsa_padding).encode(ExternalEncoding), input_name='rsa_padding'), namespace_))
        if self.hmac is not None:
            showIndent(outfile, level)
            outfile.write('<%shmac>%s</%shmac>\n' % (namespace_, self.gds_format_boolean(self.gds_str_lower(str(self.hmac)), input_name='hmac'), namespace_))
        if self.secboot_version is not None:
            showIndent(outfile, level)
            outfile.write('<%ssecboot_version>%s</%ssecboot_version>\n' % (namespace_, self.gds_format_string(quote_xml(self.secboot_version).encode(ExternalEncoding), input_name='secboot_version'), namespace_))
        if self.qti_sign is not None:
            showIndent(outfile, level)
            outfile.write('<%sqti_sign>%s</%sqti_sign>\n' % (namespace_, self.gds_format_boolean(self.gds_str_lower(str(self.qti_sign)), input_name='qti_sign'), namespace_))
        if self.oem_sign is not None:
            showIndent(outfile, level)
            outfile.write('<%soem_sign>%s</%soem_sign>\n' % (namespace_, self.gds_format_boolean(self.gds_str_lower(str(self.oem_sign)), input_name='oem_sign'), namespace_))
        if self.UIE_key is not None:
            showIndent(outfile, level)
            outfile.write('<%sUIE_key>%s</%sUIE_key>\n' % (namespace_, self.gds_format_string(quote_xml(self.UIE_key).encode(ExternalEncoding), input_name='UIE_key'), namespace_))
        if self.UIE_capability is not None:
            showIndent(outfile, level)
            outfile.write('<%sUIE_capability>%s</%sUIE_capability>\n' % (namespace_, self.gds_format_string(quote_xml(self.UIE_capability).encode(ExternalEncoding), input_name='UIE_capability'), namespace_))
        if self.UIE_server_cert_path is not None:
            showIndent(outfile, level)
            outfile.write('<%sUIE_server_cert_path>%s</%sUIE_server_cert_path>\n' % (namespace_, self.gds_format_string(quote_xml(self.UIE_server_cert_path).encode(ExternalEncoding), input_name='UIE_server_cert_path'), namespace_))
        if self.UIE_server_url is not None:
            showIndent(outfile, level)
            outfile.write('<%sUIE_server_url>%s</%sUIE_server_url>\n' % (namespace_, self.gds_format_string(quote_xml(self.UIE_server_url).encode(ExternalEncoding), input_name='UIE_server_url'), namespace_))
        if self.UIE_root_key_type is not None:
            showIndent(outfile, level)
            outfile.write('<%sUIE_root_key_type>%s</%sUIE_root_key_type>\n' % (namespace_, self.gds_format_integer(self.UIE_root_key_type, input_name='UIE_root_key_type'), namespace_))
        if self.uie_key_switch_enable is not None:
            showIndent(outfile, level)
            outfile.write('<%suie_key_switch_enable>%s</%suie_key_switch_enable>\n' % (namespace_, self.gds_format_string(quote_xml(self.uie_key_switch_enable).encode(ExternalEncoding), input_name='uie_key_switch_enable'), namespace_))
        if self.oem_id_independent is not None:
            showIndent(outfile, level)
            outfile.write('<%soem_id_independent>%s</%soem_id_independent>\n' % (namespace_, self.gds_format_integer(self.oem_id_independent, input_name='oem_id_independent'), namespace_))
        if self.revocation_enablement is not None:
            showIndent(outfile, level)
            outfile.write('<%srevocation_enablement>%s</%srevocation_enablement>\n' % (namespace_, self.gds_format_string(quote_xml(self.revocation_enablement).encode(ExternalEncoding), input_name='revocation_enablement'), namespace_))
        if self.activation_enablement is not None:
            showIndent(outfile, level)
            outfile.write('<%sactivation_enablement>%s</%sactivation_enablement>\n' % (namespace_, self.gds_format_string(quote_xml(self.activation_enablement).encode(ExternalEncoding), input_name='activation_enablement'), namespace_))
        if self.root_revoke_activate_enable is not None:
            showIndent(outfile, level)
            outfile.write('<%sroot_revoke_activate_enable>%s</%sroot_revoke_activate_enable>\n' % (namespace_, self.gds_format_string(quote_xml(self.root_revoke_activate_enable).encode(ExternalEncoding), input_name='root_revoke_activate_enable'), namespace_))
        if self.dsa_type is not None:
            showIndent(outfile, level)
            outfile.write('<%sdsa_type>%s</%sdsa_type>\n' % (namespace_, self.gds_format_string(quote_xml(self.dsa_type).encode(ExternalEncoding), input_name='dsa_type'), namespace_))
        if self.ecdsa_curve is not None:
            showIndent(outfile, level)
            outfile.write('<%secdsa_curve>%s</%secdsa_curve>\n' % (namespace_, self.gds_format_string(quote_xml(self.ecdsa_curve).encode(ExternalEncoding), input_name='ecdsa_curve'), namespace_))
        if self.multi_image_segment_addr is not None:
            showIndent(outfile, level)
            outfile.write('<%smulti_image_segment_addr>%s</%smulti_image_segment_addr>\n' % (namespace_, self.gds_format_string(quote_xml(self.multi_image_segment_addr).encode(ExternalEncoding), input_name='multi_image_segment_addr'), namespace_))
        if self.client_id is not None:
            showIndent(outfile, level)
            outfile.write('<%sclient_id>%s</%sclient_id>\n' % (namespace_, self.gds_format_string(quote_xml(self.client_id).encode(ExternalEncoding), input_name='client_id'), namespace_))
        if self.lib_id is not None:
            showIndent(outfile, level)
            outfile.write('<%slib_id>%s</%slib_id>\n' % (namespace_, self.gds_format_string(quote_xml(self.lib_id).encode(ExternalEncoding), input_name='lib_id'), namespace_))
        if self.image_entry is not None:
            showIndent(outfile, level)
            outfile.write('<%simage_entry>%s</%simage_entry>\n' % (namespace_, self.gds_format_string(quote_xml(self.image_entry).encode(ExternalEncoding), input_name='image_entry'), namespace_))
    def hasContent_(self):
        if (
            self.selected_encryptor is not None or
            self.max_cert_size is not None or
            self.key_size is not None or
            self.num_certs_in_certchain is not None or
            self.num_root_certs is not None or
            self.max_num_root_certs is not None or
            self.testsig_serialnum is not None or
            self.mrc_index is not None or
            self.msm_part is not None or
            self.oem_id is not None or
            self.model_id is not None or
            self.sw_id is not None or
            self.anti_rollback_version is not None or
            self.app_id is not None or
            self.crash_dump is not None or
            self.rot_en is not None or
            self.soc_hw_version is not None or
            self.soc_vers is not None or
            self.mask_soc_hw_version is not None or
            self.in_use_soc_hw_version is not None or
            self.use_serial_number_in_signing is not None or
            self.serial_number is not None or
            self.debug is not None or
            self.multi_serial_numbers is not None or
            self.exponent is not None or
            self.object_id is not None or
            self.cass_capability is not None or
            self.hash_pageseg_as_segment is not None or
            self.hash_algorithm is not None or
            self.segment_hash_algorithm is not None or
            self.cass_attest_cert is not None or
            self.rsa_padding is not None or
            self.hmac is not None or
            self.secboot_version is not None or
            self.qti_sign is not None or
            self.oem_sign is not None or
            self.UIE_key is not None or
            self.UIE_capability is not None or
            self.UIE_server_cert_path is not None or
            self.UIE_server_url is not None or
            self.UIE_root_key_type is not None or
            self.uie_key_switch_enable is not None or
            self.oem_id_independent is not None or
            self.revocation_enablement is not None or
            self.activation_enablement is not None or
            self.root_revoke_activate_enable is not None or
            self.dsa_type is not None or
            self.ecdsa_curve is not None or
            self.multi_image_segment_addr is not None or
            self.client_id is not None or
            self.lib_id is not None or
            self.image_entry is not None
            ):
            return True
        else:
            return False
    def exportLiteral(self, outfile, level, name_='complex_general_properties_overrides'):
        level += 1
        self.exportLiteralAttributes(outfile, level, [], name_)
        if self.hasContent_():
            self.exportLiteralChildren(outfile, level, name_)
    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
        pass
    def exportLiteralChildren(self, outfile, level, name_):
        if self.selected_encryptor is not None:
            showIndent(outfile, level)
            outfile.write('selected_encryptor=%s,\n' % quote_python(self.selected_encryptor).encode(ExternalEncoding))
        if self.max_cert_size is not None:
            showIndent(outfile, level)
            outfile.write('max_cert_size=%d,\n' % self.max_cert_size)
        if self.key_size is not None:
            showIndent(outfile, level)
            outfile.write('key_size=%d,\n' % self.key_size)
        if self.num_certs_in_certchain is not None:
            showIndent(outfile, level)
            outfile.write('num_certs_in_certchain=%d,\n' % self.num_certs_in_certchain)
        if self.num_root_certs is not None:
            showIndent(outfile, level)
            outfile.write('num_root_certs=%d,\n' % self.num_root_certs)
        if self.max_num_root_certs is not None:
            showIndent(outfile, level)
            outfile.write('max_num_root_certs=%d,\n' % self.max_num_root_certs)
        if self.testsig_serialnum is not None:
            showIndent(outfile, level)
            outfile.write('testsig_serialnum=%s,\n' % quote_python(self.testsig_serialnum).encode(ExternalEncoding))
        if self.mrc_index is not None:
            showIndent(outfile, level)
            outfile.write('mrc_index=%d,\n' % self.mrc_index)
        if self.msm_part is not None:
            showIndent(outfile, level)
            outfile.write('msm_part=%s,\n' % quote_python(self.msm_part).encode(ExternalEncoding))
        if self.oem_id is not None:
            showIndent(outfile, level)
            outfile.write('oem_id=%s,\n' % quote_python(self.oem_id).encode(ExternalEncoding))
        if self.model_id is not None:
            showIndent(outfile, level)
            outfile.write('model_id=%s,\n' % quote_python(self.model_id).encode(ExternalEncoding))
        if self.sw_id is not None:
            showIndent(outfile, level)
            outfile.write('sw_id=%s,\n' % quote_python(self.sw_id).encode(ExternalEncoding))
        if self.anti_rollback_version is not None:
            showIndent(outfile, level)
            outfile.write('anti_rollback_version=%s,\n' % quote_python(self.anti_rollback_version).encode(ExternalEncoding))
        if self.app_id is not None:
            showIndent(outfile, level)
            outfile.write('app_id=%s,\n' % quote_python(self.app_id).encode(ExternalEncoding))
        if self.crash_dump is not None:
            showIndent(outfile, level)
            outfile.write('crash_dump=%s,\n' % quote_python(self.crash_dump).encode(ExternalEncoding))
        if self.rot_en is not None:
            showIndent(outfile, level)
            outfile.write('rot_en=%s,\n' % quote_python(self.rot_en).encode(ExternalEncoding))
        if self.soc_hw_version is not None:
            showIndent(outfile, level)
            outfile.write('soc_hw_version=%s,\n' % quote_python(self.soc_hw_version).encode(ExternalEncoding))
        if self.soc_vers is not None:
            showIndent(outfile, level)
            outfile.write('soc_vers=%s,\n' % quote_python(self.soc_vers).encode(ExternalEncoding))
        if self.mask_soc_hw_version is not None:
            showIndent(outfile, level)
            outfile.write('mask_soc_hw_version=%s,\n' % quote_python(self.mask_soc_hw_version).encode(ExternalEncoding))
        if self.in_use_soc_hw_version is not None:
            showIndent(outfile, level)
            outfile.write('in_use_soc_hw_version=%d,\n' % self.in_use_soc_hw_version)
        if self.use_serial_number_in_signing is not None:
            showIndent(outfile, level)
            outfile.write('use_serial_number_in_signing=%d,\n' % self.use_serial_number_in_signing)
        if self.serial_number is not None:
            showIndent(outfile, level)
            outfile.write('serial_number=%s,\n' % quote_python(self.serial_number).encode(ExternalEncoding))
        if self.debug is not None:
            showIndent(outfile, level)
            outfile.write('debug=%s,\n' % quote_python(self.debug).encode(ExternalEncoding))
        if self.multi_serial_numbers is not None:
            showIndent(outfile, level)
            outfile.write('multi_serial_numbers=model_.complex_multi_serial_numbers(\n')
            self.multi_serial_numbers.exportLiteral(outfile, level, name_='multi_serial_numbers')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.exponent is not None:
            showIndent(outfile, level)
            outfile.write('exponent=%d,\n' % self.exponent)
        if self.object_id is not None:
            showIndent(outfile, level)
            outfile.write('object_id=model_.complex_oid(\n')
            self.object_id.exportLiteral(outfile, level, name_='object_id')
            showIndent(outfile, level)
            outfile.write('),\n')
        if self.cass_capability is not None:
            showIndent(outfile, level)
            outfile.write('cass_capability=%s,\n' % quote_python(self.cass_capability).encode(ExternalEncoding))
        if self.hash_pageseg_as_segment is not None:
            showIndent(outfile, level)
            outfile.write('hash_pageseg_as_segment=%s,\n' % self.hash_pageseg_as_segment)
        if self.hash_algorithm is not None:
            showIndent(outfile, level)
            outfile.write('hash_algorithm=%s,\n' % quote_python(self.hash_algorithm).encode(ExternalEncoding))
        if self.segment_hash_algorithm is not None:
            showIndent(outfile, level)
            outfile.write('segment_hash_algorithm=%s,\n' % quote_python(self.segment_hash_algorithm).encode(ExternalEncoding))
        if self.cass_attest_cert is not None:
            showIndent(outfile, level)
            outfile.write('cass_attest_cert=%s,\n' % quote_python(self.cass_attest_cert).encode(ExternalEncoding))
        if self.rsa_padding is not None:
            showIndent(outfile, level)
            outfile.write('rsa_padding=%s,\n' % quote_python(self.rsa_padding).encode(ExternalEncoding))
        if self.hmac is not None:
            showIndent(outfile, level)
            outfile.write('hmac=%s,\n' % self.hmac)
        if self.secboot_version is not None:
            showIndent(outfile, level)
            outfile.write('secboot_version=%s,\n' % quote_python(self.secboot_version).encode(ExternalEncoding))
        if self.qti_sign is not None:
            showIndent(outfile, level)
            outfile.write('qti_sign=%s,\n' % self.qti_sign)
        if self.oem_sign is not None:
            showIndent(outfile, level)
            outfile.write('oem_sign=%s,\n' % self.oem_sign)
        if self.UIE_key is not None:
            showIndent(outfile, level)
            outfile.write('UIE_key=%s,\n' % quote_python(self.UIE_key).encode(ExternalEncoding))
        if self.UIE_capability is not None:
            showIndent(outfile, level)
            outfile.write('UIE_capability=%s,\n' % quote_python(self.UIE_capability).encode(ExternalEncoding))
        if self.UIE_server_cert_path is not None:
            showIndent(outfile, level)
            outfile.write('UIE_server_cert_path=%s,\n' % quote_python(self.UIE_server_cert_path).encode(ExternalEncoding))
        if self.UIE_server_url is not None:
            showIndent(outfile, level)
            outfile.write('UIE_server_url=%s,\n' % quote_python(self.UIE_server_url).encode(ExternalEncoding))
        if self.UIE_root_key_type is not None:
            showIndent(outfile, level)
            outfile.write('UIE_root_key_type=%d,\n' % self.UIE_root_key_type)
        if self.uie_key_switch_enable is not None:
            showIndent(outfile, level)
            outfile.write('uie_key_switch_enable=%s,\n' % quote_python(self.uie_key_switch_enable).encode(ExternalEncoding))
        if self.oem_id_independent is not None:
            showIndent(outfile, level)
            outfile.write('oem_id_independent=%d,\n' % self.oem_id_independent)
        if self.revocation_enablement is not None:
            showIndent(outfile, level)
            outfile.write('revocation_enablement=%s,\n' % quote_python(self.revocation_enablement).encode(ExternalEncoding))
        if self.activation_enablement is not None:
            showIndent(outfile, level)
            outfile.write('activation_enablement=%s,\n' % quote_python(self.activation_enablement).encode(ExternalEncoding))
        if self.root_revoke_activate_enable is not None:
            showIndent(outfile, level)
            outfile.write('root_revoke_activate_enable=%s,\n' % quote_python(self.root_revoke_activate_enable).encode(ExternalEncoding))
        if self.dsa_type is not None:
            showIndent(outfile, level)
            outfile.write('dsa_type=%s,\n' % quote_python(self.dsa_type).encode(ExternalEncoding))
        if self.ecdsa_curve is not None:
            showIndent(outfile, level)
            outfile.write('ecdsa_curve=%s,\n' % quote_python(self.ecdsa_curve).encode(ExternalEncoding))
        if self.multi_image_segment_addr is not None:
            showIndent(outfile, level)
            outfile.write('multi_image_segment_addr=%s,\n' % quote_python(self.multi_image_segment_addr).encode(ExternalEncoding))
        if self.client_id is not None:
            showIndent(outfile, level)
            outfile.write('client_id=%s,\n' % quote_python(self.client_id).encode(ExternalEncoding))
        if self.lib_id is not None:
            showIndent(outfile, level)
            outfile.write('lib_id=%s,\n' % quote_python(self.lib_id).encode(ExternalEncoding))
        if self.image_entry is not None:
            showIndent(outfile, level)
            outfile.write('image_entry=%s,\n' % quote_python(self.image_entry).encode(ExternalEncoding))
    def build(self, node):
        self.buildAttributes(node, node.attrib, [])
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self.buildChildren(child, node, nodeName_)
    def buildAttributes(self, node, attrs, already_processed):
        pass
    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'selected_encryptor':
            selected_encryptor_ = child_.text
            selected_encryptor_ = self.gds_validate_string(selected_encryptor_, node, 'selected_encryptor')
            self.selected_encryptor = selected_encryptor_
        elif nodeName_ == 'max_cert_size':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError), exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            ival_ = self.gds_validate_integer(ival_, node, 'max_cert_size')
            self.max_cert_size = ival_
        elif nodeName_ == 'key_size':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError), exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            ival_ = self.gds_validate_integer(ival_, node, 'key_size')
            self.key_size = ival_
        elif nodeName_ == 'num_certs_in_certchain':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError), exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            ival_ = self.gds_validate_integer(ival_, node, 'num_certs_in_certchain')
            self.num_certs_in_certchain = ival_
        elif nodeName_ == 'num_root_certs':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError), exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            ival_ = self.gds_validate_integer(ival_, node, 'num_root_certs')
            self.num_root_certs = ival_
        elif nodeName_ == 'max_num_root_certs':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError), exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            ival_ = self.gds_validate_integer(ival_, node, 'max_num_root_certs')
            self.max_num_root_certs = ival_
        elif nodeName_ == 'testsig_serialnum':
            testsig_serialnum_ = child_.text
            testsig_serialnum_ = self.gds_validate_string(testsig_serialnum_, node, 'testsig_serialnum')
            self.testsig_serialnum = testsig_serialnum_
        elif nodeName_ == 'mrc_index':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError), exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            ival_ = self.gds_validate_integer(ival_, node, 'mrc_index')
            self.mrc_index = ival_
        elif nodeName_ == 'msm_part':
            msm_part_ = child_.text
            msm_part_ = self.gds_validate_string(msm_part_, node, 'msm_part')
            self.msm_part = msm_part_
        elif nodeName_ == 'oem_id':
            oem_id_ = child_.text
            oem_id_ = self.gds_validate_string(oem_id_, node, 'oem_id')
            self.oem_id = oem_id_
        elif nodeName_ == 'model_id':
            model_id_ = child_.text
            model_id_ = self.gds_validate_string(model_id_, node, 'model_id')
            self.model_id = model_id_
        elif nodeName_ == 'sw_id':
            sw_id_ = child_.text
            sw_id_ = self.gds_validate_string(sw_id_, node, 'sw_id')
            self.sw_id = sw_id_
        elif nodeName_ == 'anti_rollback_version':
            anti_rollback_version_ = child_.text
            anti_rollback_version_ = self.gds_validate_string(anti_rollback_version_, node, 'anti_rollback_version')
            self.anti_rollback_version = anti_rollback_version_
        elif nodeName_ == 'app_id':
            app_id_ = child_.text
            app_id_ = self.gds_validate_string(app_id_, node, 'app_id')
            self.app_id = app_id_
        elif nodeName_ == 'crash_dump':
            crash_dump_ = child_.text
            crash_dump_ = self.gds_validate_string(crash_dump_, node, 'crash_dump')
            self.crash_dump = crash_dump_
        elif nodeName_ == 'rot_en':
            rot_en_ = child_.text
            rot_en_ = self.gds_validate_string(rot_en_, node, 'rot_en')
            self.rot_en = rot_en_
        elif nodeName_ == 'soc_hw_version':
            soc_hw_version_ = child_.text
            soc_hw_version_ = self.gds_validate_string(soc_hw_version_, node, 'soc_hw_version')
            self.soc_hw_version = soc_hw_version_
        elif nodeName_ == 'soc_vers':
            soc_vers_ = child_.text
            soc_vers_ = self.gds_validate_string(soc_vers_, node, 'soc_vers')
            self.soc_vers = soc_vers_
        elif nodeName_ == 'mask_soc_hw_version':
            mask_soc_hw_version_ = child_.text
            mask_soc_hw_version_ = self.gds_validate_string(mask_soc_hw_version_, node, 'mask_soc_hw_version')
            self.mask_soc_hw_version = mask_soc_hw_version_
        elif nodeName_ == 'in_use_soc_hw_version':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError), exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            ival_ = self.gds_validate_integer(ival_, node, 'in_use_soc_hw_version')
            self.in_use_soc_hw_version = ival_
        elif nodeName_ == 'use_serial_number_in_signing':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError), exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            ival_ = self.gds_validate_integer(ival_, node, 'use_serial_number_in_signing')
            self.use_serial_number_in_signing = ival_
        elif nodeName_ == 'serial_number':
            serial_number_ = child_.text
            serial_number_ = self.gds_validate_string(serial_number_, node, 'serial_number')
            self.serial_number = serial_number_
        elif nodeName_ == 'debug':
            debug_ = child_.text
            debug_ = self.gds_validate_string(debug_, node, 'debug')
            self.debug = debug_
        elif nodeName_ == 'multi_serial_numbers':
            obj_ = complex_multi_serial_numbers.factory()
            obj_.build(child_)
            self.set_multi_serial_numbers(obj_)
        elif nodeName_ == 'exponent':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError), exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            ival_ = self.gds_validate_integer(ival_, node, 'exponent')
            self.exponent = ival_
        elif nodeName_ == 'object_id':
            obj_ = complex_oid.factory()
            obj_.build(child_)
            self.set_object_id(obj_)
        elif nodeName_ == 'cass_capability':
            cass_capability_ = child_.text
            cass_capability_ = self.gds_validate_string(cass_capability_, node, 'cass_capability')
            self.cass_capability = cass_capability_
        elif nodeName_ == 'hash_pageseg_as_segment':
            sval_ = child_.text
            if sval_ in ('true', '1'):
                ival_ = True
            elif sval_ in ('false', '0'):
                ival_ = False
            else:
                raise_parse_error(child_, 'requires boolean')
            ival_ = self.gds_validate_boolean(ival_, node, 'hash_pageseg_as_segment')
            self.hash_pageseg_as_segment = ival_
        elif nodeName_ == 'hash_algorithm':
            hash_algorithm_ = child_.text
            hash_algorithm_ = self.gds_validate_string(hash_algorithm_, node, 'hash_algorithm')
            self.hash_algorithm = hash_algorithm_
        elif nodeName_ == 'segment_hash_algorithm':
            segment_hash_algorithm_ = child_.text
            segment_hash_algorithm_ = self.gds_validate_string(segment_hash_algorithm_, node, 'segment_hash_algorithm')
            self.segment_hash_algorithm = segment_hash_algorithm_
        elif nodeName_ == 'cass_attest_cert':
            cass_attest_cert_ = child_.text
            cass_attest_cert_ = self.gds_validate_string(cass_attest_cert_, node, 'cass_attest_cert')
            self.cass_attest_cert = cass_attest_cert_
        elif nodeName_ == 'rsa_padding':
            rsa_padding_ = child_.text
            rsa_padding_ = self.gds_validate_string(rsa_padding_, node, 'rsa_padding')
            self.rsa_padding = rsa_padding_
        elif nodeName_ == 'hmac':
            sval_ = child_.text
            if sval_ in ('true', '1'):
                ival_ = True
            elif sval_ in ('false', '0'):
                ival_ = False
            else:
                raise_parse_error(child_, 'requires boolean')
            ival_ = self.gds_validate_boolean(ival_, node, 'hmac')
            self.hmac = ival_
        elif nodeName_ == 'secboot_version':
            secboot_version_ = child_.text
            secboot_version_ = self.gds_validate_string(secboot_version_, node, 'secboot_version')
            self.secboot_version = secboot_version_
        elif nodeName_ == 'qti_sign':
            sval_ = child_.text
            if sval_ in ('true', '1'):
                ival_ = True
            elif sval_ in ('false', '0'):
                ival_ = False
            else:
                raise_parse_error(child_, 'requires boolean')
            ival_ = self.gds_validate_boolean(ival_, node, 'qti_sign')
            self.qti_sign = ival_
        elif nodeName_ == 'oem_sign':
            sval_ = child_.text
            if sval_ in ('true', '1'):
                ival_ = True
            elif sval_ in ('false', '0'):
                ival_ = False
            else:
                raise_parse_error(child_, 'requires boolean')
            ival_ = self.gds_validate_boolean(ival_, node, 'oem_sign')
            self.oem_sign = ival_
        elif nodeName_ == 'UIE_key':
            UIE_key_ = child_.text
            UIE_key_ = self.gds_validate_string(UIE_key_, node, 'UIE_key')
            self.UIE_key = UIE_key_
        elif nodeName_ == 'UIE_capability':
            UIE_capability_ = child_.text
            UIE_capability_ = self.gds_validate_string(UIE_capability_, node, 'UIE_capability')
            self.UIE_capability = UIE_capability_
        elif nodeName_ == 'UIE_server_cert_path':
            UIE_server_cert_path_ = child_.text
            UIE_server_cert_path_ = self.gds_validate_string(UIE_server_cert_path_, node, 'UIE_server_cert_path')
            self.UIE_server_cert_path = UIE_server_cert_path_
        elif nodeName_ == 'UIE_server_url':
            UIE_server_url_ = child_.text
            UIE_server_url_ = self.gds_validate_string(UIE_server_url_, node, 'UIE_server_url')
            self.UIE_server_url = UIE_server_url_
        elif nodeName_ == 'UIE_root_key_type':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError), exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            ival_ = self.gds_validate_integer(ival_, node, 'UIE_root_key_type')
            self.UIE_root_key_type = ival_
        elif nodeName_ == 'uie_key_switch_enable':
            uie_key_switch_enable_ = child_.text
            uie_key_switch_enable_ = self.gds_validate_string(uie_key_switch_enable_, node, 'uie_key_switch_enable')
            self.uie_key_switch_enable = uie_key_switch_enable_
        elif nodeName_ == 'oem_id_independent':
            sval_ = child_.text
            try:
                ival_ = int(sval_)
            except (TypeError, ValueError), exp:
                raise_parse_error(child_, 'requires integer: %s' % exp)
            ival_ = self.gds_validate_integer(ival_, node, 'oem_id_independent')
            self.oem_id_independent = ival_
        elif nodeName_ == 'revocation_enablement':
            revocation_enablement_ = child_.text
            revocation_enablement_ = self.gds_validate_string(revocation_enablement_, node, 'revocation_enablement')
            self.revocation_enablement = revocation_enablement_
        elif nodeName_ == 'activation_enablement':
            activation_enablement_ = child_.text
            activation_enablement_ = self.gds_validate_string(activation_enablement_, node, 'activation_enablement')
            self.activation_enablement = activation_enablement_
        elif nodeName_ == 'root_revoke_activate_enable':
            root_revoke_activate_enable_ = child_.text
            root_revoke_activate_enable_ = self.gds_validate_string(root_revoke_activate_enable_, node, 'root_revoke_activate_enable')
            self.root_revoke_activate_enable = root_revoke_activate_enable_
        elif nodeName_ == 'dsa_type':
            dsa_type_ = child_.text
            dsa_type_ = self.gds_validate_string(dsa_type_, node, 'dsa_type')
            self.dsa_type = dsa_type_
        elif nodeName_ == 'ecdsa_curve':
            ecdsa_curve_ = child_.text
            ecdsa_curve_ = self.gds_validate_string(ecdsa_curve_, node, 'ecdsa_curve')
            self.ecdsa_curve = ecdsa_curve_
        elif nodeName_ == 'multi_image_segment_addr':
            multi_image_segment_addr_ = child_.text
            multi_image_segment_addr_ = self.gds_validate_string(multi_image_segment_addr_, node, 'multi_image_segment_addr')
            self.multi_image_segment_addr = multi_image_segment_addr_
        elif nodeName_ == 'client_id':
            client_id_ = child_.text
            client_id_ = self.gds_validate_string(client_id_, node, 'client_id')
            self.client_id = client_id_
        elif nodeName_ == 'lib_id':
            lib_id_ = child_.text
            lib_id_ = self.gds_validate_string(lib_id_, node, 'lib_id')
            self.lib_id = lib_id_
        elif nodeName_ == 'image_entry':
            image_entry_ = child_.text
            image_entry_ = self.gds_validate_string(image_entry_, node, 'image_entry')
            self.image_entry = image_entry_
# end class complex_general_properties_overrides


USAGE_TEXT = """
Usage: python <Parser>.py [ -s ] <in_xml_file>
"""

def usage():
    print USAGE_TEXT
    sys.exit(1)


def get_root_tag(node):
    tag = Tag_pattern_.match(node.tag).groups()[-1]
    rootClass = globals().get(tag)
    return tag, rootClass


def parse(inFileName):
    doc = parsexml_(inFileName)
    rootNode = doc.getroot()
    rootTag, rootClass = get_root_tag(rootNode)
    if rootClass is None:
        rootTag = 'secimage'
        rootClass = secimage
    rootObj = rootClass.factory()
    rootObj.build(rootNode)
    # Enable Python to collect the space used by the DOM.
    doc = None
    sys.stdout.write('<?xml version="1.0" ?>\n')
    rootObj.export(sys.stdout, 0, name_=rootTag, 
        namespacedef_='xmlns:tns="http://www.qualcomm.com/secimage"')
    return rootObj


def parseString(inString):
    from StringIO import StringIO
    doc = parsexml_(StringIO(inString))
    rootNode = doc.getroot()
    rootTag, rootClass = get_root_tag(rootNode)
    if rootClass is None:
        rootTag = 'secimage'
        rootClass = secimage
    rootObj = rootClass.factory()
    rootObj.build(rootNode)
    # Enable Python to collect the space used by the DOM.
    doc = None
    sys.stdout.write('<?xml version="1.0" ?>\n')
    rootObj.export(sys.stdout, 0, name_="secimage",
        namespacedef_='xmlns:tns="http://www.qualcomm.com/secimage"')
    return rootObj


def parseLiteral(inFileName):
    doc = parsexml_(inFileName)
    rootNode = doc.getroot()
    rootTag, rootClass = get_root_tag(rootNode)
    if rootClass is None:
        rootTag = 'secimage'
        rootClass = secimage
    rootObj = rootClass.factory()
    rootObj.build(rootNode)
    # Enable Python to collect the space used by the DOM.
    doc = None
    sys.stdout.write('#from auto_gen_xml_config import *\n\n')
    sys.stdout.write('import auto_gen_xml_config as model_\n\n')
    sys.stdout.write('rootObj = model_.rootTag(\n')
    rootObj.exportLiteral(sys.stdout, 0, name_=rootTag)
    sys.stdout.write(')\n')
    return rootObj


def main():
    args = sys.argv[1:]
    if len(args) == 1:
        parse(args[0])
    else:
        usage()


if __name__ == '__main__':
    #import pdb; pdb.set_trace()
    main()


__all__ = [
    "complex_cass_signer_attributes",
    "complex_data_provisioning",
    "complex_elf_properties",
    "complex_ewm_properties",
    "complex_general_properties",
    "complex_general_properties_overrides",
    "complex_image",
    "complex_image_type",
    "complex_image_types_list",
    "complex_images_list",
    "complex_mbn_properties",
    "complex_metadata",
    "complex_multi_serial_numbers",
    "complex_oid",
    "complex_parsegen",
    "complex_pmbl_properties",
    "complex_post_process",
    "complex_remote_client_signer_attributes",
    "complex_remote_signer_attributes",
    "complex_server",
    "complex_signer_attributes",
    "complex_signing",
    "complex_token_driver_home",
    "complex_user_identity",
    "host_validation_mode",
    "keystore_type",
    "secimage",
    "trust_keystore_type"
    ]
